mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
#303 Torches are able to be placed on top of Fences [gh#303]
This commit is contained in:
@@ -43,7 +43,7 @@ class TorchBlock extends FlowableBlock{
|
||||
0 => 0,
|
||||
);
|
||||
|
||||
if($this->getSide($faces[$side])->isTransparent === true){ //Replace wit hcommon break method
|
||||
if($this->getSide($faces[$side])->isFlowable === true){ //Replace wit common break method
|
||||
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem($this->id));
|
||||
$this->level->setBlock($this, new AirBlock(), false);
|
||||
return BLOCK_UPDATE_NORMAL;
|
||||
@@ -64,7 +64,7 @@ class TorchBlock extends FlowableBlock{
|
||||
$this->meta = $faces[$face];
|
||||
$this->level->setBlock($block, $this);
|
||||
return true;
|
||||
}elseif($this->getSide(0)->isTransparent === false){
|
||||
}elseif($this->getSide(0)->isTransparent === false or $this->getSide(0)->getID() === FENCE){
|
||||
$this->meta = 0;
|
||||
$this->level->setBlock($block, $this);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user