diff --git a/src/pocketmine/block/FenceGate.php b/src/pocketmine/block/FenceGate.php index 417e95c49..edfe03039 100644 --- a/src/pocketmine/block/FenceGate.php +++ b/src/pocketmine/block/FenceGate.php @@ -42,7 +42,7 @@ class FenceGate extends Transparent{ if($this->getDamage() !== 2 and $this->getDamage() !== 0){ return new AxisAlignedBB( $this->x + 0.375, - $this->y + 0.0, + $this->y, $this->z, $this->x + 0.625, $this->y + 1, diff --git a/src/pocketmine/block/Ladder.php b/src/pocketmine/block/Ladder.php index 1e74d8573..90ff87d4f 100644 --- a/src/pocketmine/block/Ladder.php +++ b/src/pocketmine/block/Ladder.php @@ -23,6 +23,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use pocketmine\level\Level; +use pocketmine\math\AxisAlignedBB; use pocketmine\Player; class Ladder extends Transparent{ @@ -34,6 +35,46 @@ class Ladder extends Transparent{ } public function getBoundingBox(){ + $f = 0.125; + + if($this->meta === 2){ + return new AxisAlignedBB( + $this->x, + $this->y, + $this->z + 1 - $f, + $this->x + 1, + $this->y + 1, + $this->z + 1 + ); + }elseif($this->meta === 3){ + return new AxisAlignedBB( + $this->x, + $this->y, + $this->z, + $this->x + 1, + $this->y + 1, + $this->z + $f + ); + }elseif($this->meta === 4){ + return new AxisAlignedBB( + $this->x + 1 - $f, + $this->y, + $this->z, + $this->x + 1, + $this->y + 1, + $this->z + 1 + ); + }elseif($this->meta === 5){ + return new AxisAlignedBB( + $this->x, + $this->y, + $this->z, + $this->x + $f, + $this->y + 1, + $this->z + 1 + ); + } + return null; }