added ice aabb for entities

This commit is contained in:
GameHerobrine 2024-01-16 08:49:59 +03:00
parent c3e6554762
commit a38e2054a8

View file

@ -11,6 +11,11 @@ class IceBlock extends TransparentBlock{
$this->level->scheduleBlockUpdate(new Position($this, 0, 0, $this->level), Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM);
return $ret;
}
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
return [new AxisAlignedBB($x, $y, $z, $x+1, $y+1, $z+1)];
}
public function onBreak(Item $item, Player $player){
if(($player->gamemode & 0x01) === 0){
$this->level->setBlock($this, new WaterBlock(), true, false, true);
@ -74,4 +79,4 @@ class IceBlock extends TransparentBlock{
public function getDrops(Item $item, Player $player){
return array();
}
}
}