mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 21:19:44 +00:00
fixed blocks that have no physcis falling sometimes
This commit is contained in:
parent
b0bad174e0
commit
e45b99c7e9
1 changed files with 14 additions and 11 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue