mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Added Bed bounding box
This commit is contained in:
parent
bf839e821c
commit
793520926b
@ -23,6 +23,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\level\Level;
|
use pocketmine\level\Level;
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\network\protocol\ChatPacket;
|
use pocketmine\network\protocol\ChatPacket;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
@ -34,6 +35,17 @@ class Bed extends Transparent{
|
|||||||
$this->hardness = 1;
|
$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){
|
public function onActivate(Item $item, Player $player = null){
|
||||||
|
|
||||||
$time = $this->getLevel()->getTime() % Level::TIME_FULL;
|
$time = $this->getLevel()->getTime() % Level::TIME_FULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user