diff --git a/src/pocketmine/block/SignPost.php b/src/pocketmine/block/SignPost.php index c151f0731..5ae519979 100644 --- a/src/pocketmine/block/SignPost.php +++ b/src/pocketmine/block/SignPost.php @@ -88,7 +88,7 @@ class SignPost extends Transparent{ } public function onBreak(Item $item){ - $this->getLevel()->setBlock($this, new Air(), true, true, true); + $this->getLevel()->setBlock($this, new Air(), true, true); return true; } diff --git a/src/pocketmine/block/WallSign.php b/src/pocketmine/block/WallSign.php index 1a09123fa..66064a8bc 100644 --- a/src/pocketmine/block/WallSign.php +++ b/src/pocketmine/block/WallSign.php @@ -22,6 +22,8 @@ namespace pocketmine\block; +use pocketmine\level\Level; + class WallSign extends SignPost{ protected $id = self::WALL_SIGN; @@ -31,6 +33,20 @@ class WallSign extends SignPost{ } public function onUpdate($type){ + $faces = [ + 2 => 3, + 3 => 2, + 4 => 5, + 5 => 4, + ]; + if($type === Level::BLOCK_UPDATE_NORMAL){ + if(isset($faces[$this->meta])) { + if ($this->getSide($faces[$this->meta])->getId() === self::AIR) { + $this->getLevel()->useBreakOn($this); + } + return Level::BLOCK_UPDATE_NORMAL; + } + } return false; } } \ No newline at end of file