diff --git a/src/pocketmine/block/Stair.php b/src/pocketmine/block/Stair.php index 8da691a0d..7123d787f 100644 --- a/src/pocketmine/block/Stair.php +++ b/src/pocketmine/block/Stair.php @@ -22,6 +22,7 @@ namespace pocketmine\block; use pocketmine\item\Item; +use pocketmine\math\AxisAlignedBB; use pocketmine\Player; class Stair extends Transparent{ @@ -36,6 +37,28 @@ class Stair extends Transparent{ $this->hardness = 30; } + public function getBoundingBox(){ + if(($this->getDamage() & 0x04) > 0){ + return new AxisAlignedBB( + $this->x, + $this->y + 0.5, + $this->z, + $this->x + 1, + $this->y + 1, + $this->z + 1 + ); + }else{ + return new AxisAlignedBB( + $this->x, + $this->y, + $this->z, + $this->x + 1, + $this->y + 0.5, + $this->z + 1 + ); + } + } + public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){ $faces = [ 0 => 0,