From c79077cbed2e47653f11306e4dfba66cac9da010 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 27 Nov 2016 15:50:02 +0000 Subject: [PATCH] Fix MobHead bounding box and properties --- src/pocketmine/block/MobHead.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/block/MobHead.php b/src/pocketmine/block/MobHead.php index 7f4c3bb50..36d70edde 100644 --- a/src/pocketmine/block/MobHead.php +++ b/src/pocketmine/block/MobHead.php @@ -23,6 +23,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use pocketmine\level\Level; +use pocketmine\math\AxisAlignedBB; use pocketmine\nbt\tag\ByteTag; use pocketmine\nbt\tag\CompoundTag; use pocketmine\nbt\tag\IntTag; @@ -31,7 +32,7 @@ use pocketmine\Player; use pocketmine\tile\Spawnable; use pocketmine\tile\Tile; -class MobHead extends Solid{ +class MobHead extends Flowable{ protected $id = self::MOB_HEAD_BLOCK; @@ -49,6 +50,17 @@ class MobHead extends Solid{ return "Mob Head"; } + protected function recalculateBoundingBox(){ + return new AxisAlignedBB( + $this->x + 0.25, + $this->y, + $this->z + 0.25, + $this->x + 0.75, + $this->y + 0.5, + $this->z + 0.75 + ); + } + public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){ if($face !== 0){ $this->meta = $face;