From 6a1f8640f6d62a77db90ac6933a3ccf8702be435 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 13 Mar 2018 11:40:45 +0000 Subject: [PATCH] Cactus: fix bugs in local block updating --- src/pocketmine/block/Cactus.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pocketmine/block/Cactus.php b/src/pocketmine/block/Cactus.php index 97413d697..873293ad4 100644 --- a/src/pocketmine/block/Cactus.php +++ b/src/pocketmine/block/Cactus.php @@ -80,12 +80,14 @@ class Cactus extends Transparent{ $down = $this->getSide(Vector3::SIDE_DOWN); if($down->getId() !== self::SAND and $down->getId() !== self::CACTUS){ $this->getLevel()->useBreakOn($this); - }else{ - for($side = 2; $side <= 5; ++$side){ - $b = $this->getSide($side); - if(!$b->canBeFlowedInto()){ - $this->getLevel()->useBreakOn($this); - } + return Level::BLOCK_UPDATE_NORMAL; + } + + for($side = 2; $side <= 5; ++$side){ + $b = $this->getSide($side); + if(!$b->canBeFlowedInto()){ + $this->getLevel()->useBreakOn($this); + return Level::BLOCK_UPDATE_NORMAL; } } }elseif($type === Level::BLOCK_UPDATE_RANDOM){