Merge branch 'master' into newmovement

This commit is contained in:
GameHerobrine 2024-02-14 05:14:26 +03:00 • committed by GitHub
commit 8b47cf1b66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 52 additions and 1 deletions

View file

@ -16,6 +16,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);
@ -79,4 +84,4 @@ class IceBlock extends TransparentBlock{
public function getDrops(Item $item, Player $player){
return array();
}
}
}