mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
added ice aabb for entities
This commit is contained in:
parent
c3e6554762
commit
a38e2054a8
1 changed files with 6 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue