fixed blocks that have no physcis falling sometimes

This commit is contained in:
GameHerobrine 2025-05-20 17:15:40 +03:00
parent b0bad174e0
commit e45b99c7e9

View file

@ -58,7 +58,9 @@ class GenericBlock extends Block{
public static function onUpdate(Level $level, $x, $y, $z, $type){ public static function onUpdate(Level $level, $x, $y, $z, $type){
[$id, $meta] = $level->level->getBlock($x, $y, $z); [$id, $meta] = $level->level->getBlock($x, $y, $z);
if(StaticBlock::getHasPhysics($id)){
$down = $level->level->getBlockID($x, $y - 1, $z); $down = $level->level->getBlockID($x, $y - 1, $z);
if($down == AIR || StaticBlock::getIsLiquid($down)){ if($down == AIR || StaticBlock::getIsLiquid($down)){
$data = array( $data = array(
"x" => $x + 0.5, "x" => $x + 0.5,
@ -71,6 +73,7 @@ class GenericBlock extends Block{
$server->api->entity->spawnToAll($e); $server->api->entity->spawnToAll($e);
} }
} }
}
/** /**
* @param integer $type * @param integer $type