From 5d32587cf74ea9feba28b0b0df5b61a22c8a5469 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 30 Mar 2018 11:54:57 +0100 Subject: [PATCH] DeadBush: match placement condition with break condition, fixes #2116 --- src/pocketmine/block/DeadBush.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pocketmine/block/DeadBush.php b/src/pocketmine/block/DeadBush.php index 9e884f403..55a92d921 100644 --- a/src/pocketmine/block/DeadBush.php +++ b/src/pocketmine/block/DeadBush.php @@ -26,6 +26,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use pocketmine\item\ItemFactory; use pocketmine\math\Vector3; +use pocketmine\Player; class DeadBush extends Flowable{ @@ -39,6 +40,14 @@ class DeadBush extends Flowable{ return "Dead Bush"; } + public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ + if(!$this->getSide(Vector3::SIDE_DOWN)->isTransparent()){ + return parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player); + } + + return false; + } + public function onNearbyBlockChange() : void{ if($this->getSide(Vector3::SIDE_DOWN)->isTransparent()){ $this->getLevel()->useBreakOn($this);