water damage tweaks, using php8 pack functions

This commit is contained in:
GameHerobrine 2024-01-01 08:15:05 +03:00
parent 229a563ff5
commit 68b8232f07
17 changed files with 46 additions and 76 deletions

View file

@ -132,7 +132,7 @@ class SuperflatGenerator implements LevelGenerator{
$end = 128 + $spawn[0];
for($x = $start; $x <= $end; ++$x){
for($z = $start; $z <= $end; ++$z){
if(floor(sqrt(pow($x - 128, 2) + pow($z - 128, 2))) <= $spawn[0]){
if(floor(sqrt(($x - 128)*($x - 128)+ ($z - 128)*($z - 128))) <= $spawn[0]){
$this->level->setBlockRaw(new Vector3($x, $this->floorLevel - 1, $z), $spawn[1], null);
}
}