fixed entity collisions with chests

This commit is contained in:
GameHerobrine 2024-04-06 18:03:34 +03:00
parent a71f10294d
commit c9da91378d
3 changed files with 7 additions and 4 deletions

View file

@ -7,6 +7,10 @@ class ChestBlock extends TransparentBlock{
$this->isFullBlock = false;
$this->hardness = 15;
}
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
return [new AxisAlignedBB($x + 0.025, $y, $z + 0.025, $x + 0.975, $y + 0.95, $z + 0.975)];
}
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
$server = ServerAPI::request();
$faces = array(