mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Added Chest bounding box
This commit is contained in:
parent
793520926b
commit
d4907a2688
@ -22,6 +22,7 @@
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\nbt\NBT;
|
use pocketmine\nbt\NBT;
|
||||||
use pocketmine\nbt\tag\Compound;
|
use pocketmine\nbt\tag\Compound;
|
||||||
use pocketmine\nbt\tag\Enum;
|
use pocketmine\nbt\tag\Enum;
|
||||||
@ -41,6 +42,17 @@ class Chest extends Transparent{
|
|||||||
$this->hardness = 15;
|
$this->hardness = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBoundingBox(){
|
||||||
|
return new AxisAlignedBB(
|
||||||
|
$this->x + 0.0625,
|
||||||
|
$this->y,
|
||||||
|
$this->z + 0.0625,
|
||||||
|
$this->x + 0.9375,
|
||||||
|
$this->y + 0.875,
|
||||||
|
$this->z + 0.9375
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
||||||
$faces = [
|
$faces = [
|
||||||
0 => 4,
|
0 => 4,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user