Added Bed bounding box

This commit is contained in:
Shoghi Cervantes 2014-08-30 02:06:46 +02:00
parent bf839e821c
commit 793520926b

View File

@ -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;