From 793520926bb0e72be8407db367aec08b1e8b2271 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 30 Aug 2014 02:06:46 +0200 Subject: [PATCH] Added Bed bounding box --- src/pocketmine/block/Bed.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pocketmine/block/Bed.php b/src/pocketmine/block/Bed.php index e94f22d73..58c6bbfea 100644 --- a/src/pocketmine/block/Bed.php +++ b/src/pocketmine/block/Bed.php @@ -23,6 +23,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use pocketmine\level\Level; +use pocketmine\math\AxisAlignedBB; use pocketmine\network\protocol\ChatPacket; use pocketmine\Player; @@ -34,6 +35,17 @@ class Bed extends Transparent{ $this->hardness = 1; } + public function getBoundingBox(){ + return new AxisAlignedBB( + $this->x, + $this->y, + $this->z, + $this->x + 1, + $this->y + 0.5625, + $this->z + 1 + ); + } + public function onActivate(Item $item, Player $player = null){ $time = $this->getLevel()->getTime() % Level::TIME_FULL;