more test fixes

This commit is contained in:
GameHerobrine 2023-03-06 15:14:34 +03:00
parent 65a85d6343
commit fc154cf903

View file

@ -48,9 +48,9 @@ private static $leavesHeight = 4;
if($xOff === $mid and $zOff === $mid and ($yOff === 0 or mt_rand(0, 1) === 0)){
continue;
}
if(!$level->getBlock(new Vector3($xx, $yy, $zz))->isSolid){
$leafpos = new Vector3($xx, $yy, $zz);
$level->setBlockRaw($leafpos, new LeavesBlock($this->type));
$b = $level->getBlock(new Vector3($xx, $yy, $zz));
if(($b instanceof LeavesBlock) || $b->getID() == 0){
$level->setBlockRaw($b, new LeavesBlock($this->type));
}
}
}