decreased block updates per chunk from 80 to 20, PMFLevel block methods should be a bit faster now, grass spread rework, leaf decay fix

This commit is contained in:
GameHerobrine 2023-06-23 20:52:50 +03:00
parent 3dd9e38a37
commit 4544b7bb63
9 changed files with 73 additions and 60 deletions

View file

@ -21,13 +21,13 @@ class DirtBlock extends SolidBlock{
return false;
}
public static function onRandomTick(Level $level, $x, $y, $z){
if(mt_rand(0, 3) == 0){
/*if(mt_rand(0, 3) == 0){
$up = $level->getBlockWithoutVector($x, $y + 1, $z, false); //$this->getSide(1);
if(($up->isTransparent === false) or ($up->isLiquid) or ($up->getID() == 60)) return false;
if(self::getGrassInRadius($level, $x, $y, $z)){
$level->setBlock(new Position($x, $y, $z, $level), BlockAPI::get(GRASS), true, false, true);
}
}
}*/
}
public function getBlockID($x, $y, $z){