From ccc5e1b628482a3d1413321f88890173701c3561 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 8 Jun 2013 14:30:47 +0200 Subject: [PATCH] SignPosts drop being without a support block --- src/material/block/attachable/SignPost.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/material/block/attachable/SignPost.php b/src/material/block/attachable/SignPost.php index 133f94cd..36347c45 100644 --- a/src/material/block/attachable/SignPost.php +++ b/src/material/block/attachable/SignPost.php @@ -53,6 +53,17 @@ class SignPostBlock extends TransparentBlock{ return false; } + public function onUpdate($type){ + if($type === BLOCK_UPDATE_NORMAL){ + if($this->getSide(0)->isSolid === false)){ //Replace wit common break method + ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem(SIGN, 0, 1)); + $this->level->setBlock($this, new AirBlock(), false); + return BLOCK_UPDATE_NORMAL; + } + } + return false; + } + public function onBreak(Item $item, Player $player){ $this->level->setBlock($this, new AirBlock(), true, true); return true;