diff --git a/src/pocketmine/block/Slab.php b/src/pocketmine/block/Slab.php index 223ec9b85..c5f279a98 100644 --- a/src/pocketmine/block/Slab.php +++ b/src/pocketmine/block/Slab.php @@ -22,6 +22,7 @@ namespace pocketmine\block; use pocketmine\item\Item; +use pocketmine\math\AxisAlignedBB; use pocketmine\Player; class Slab extends Transparent{ @@ -46,6 +47,17 @@ class Slab extends Transparent{ $this->hardness = 30; } + public function getBoundingBox(){ + return new AxisAlignedBB( + $this->x, + $this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0), + $this->z, + $this->x + 1, + $this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5), + $this->z + 1 + ); + } + public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){ $this->meta &= 0x07; if($face === 0){