Cactus: fix bugs in local block updating

This commit is contained in:
Dylan K. Taylor 2018-03-13 11:40:45 +00:00
parent 8a0414f306
commit 6a1f8640f6

View File

@ -80,12 +80,14 @@ class Cactus extends Transparent{
$down = $this->getSide(Vector3::SIDE_DOWN); $down = $this->getSide(Vector3::SIDE_DOWN);
if($down->getId() !== self::SAND and $down->getId() !== self::CACTUS){ if($down->getId() !== self::SAND and $down->getId() !== self::CACTUS){
$this->getLevel()->useBreakOn($this); $this->getLevel()->useBreakOn($this);
}else{ return Level::BLOCK_UPDATE_NORMAL;
for($side = 2; $side <= 5; ++$side){ }
$b = $this->getSide($side);
if(!$b->canBeFlowedInto()){ for($side = 2; $side <= 5; ++$side){
$this->getLevel()->useBreakOn($this); $b = $this->getSide($side);
} if(!$b->canBeFlowedInto()){
$this->getLevel()->useBreakOn($this);
return Level::BLOCK_UPDATE_NORMAL;
} }
} }
}elseif($type === Level::BLOCK_UPDATE_RANDOM){ }elseif($type === Level::BLOCK_UPDATE_RANDOM){