WorldManager: log after first chunk's generation has been completed

this is as close as we can get to the actual start of generation.
This commit is contained in:
Dylan K. Taylor 2021-04-15 14:01:28 +01:00
parent 506a235d7a
commit 8af6b112d2
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -281,7 +281,7 @@ class WorldManager{
static function() use ($world, &$done, $total) : void{ static function() use ($world, &$done, $total) : void{
$oldProgress = (int) floor(($done / $total) * 100); $oldProgress = (int) floor(($done / $total) * 100);
$newProgress = (int) floor((++$done / $total) * 100); $newProgress = (int) floor((++$done / $total) * 100);
if(intdiv($oldProgress, 10) !== intdiv($newProgress, 10) || $done === $total){ if(intdiv($oldProgress, 10) !== intdiv($newProgress, 10) || $done === $total || $done === 1){
$world->getLogger()->info("Generating spawn terrain chunks: $done / $total ($newProgress%)"); $world->getLogger()->info("Generating spawn terrain chunks: $done / $total ($newProgress%)");
} }
}, },