World: fixed every chunk having terrain saved at least once, even if unmodified

setPopulated() sets dirty flags on the chunk, causing the autosave sweep
to think they've been changed when they haven't. We now pass
terrainPopulated to the constructor to avoid this ambiguity recurring in
the future.
This commit is contained in:
Dylan K. Taylor
2021-10-25 19:49:35 +01:00
parent 42ede30e77
commit b8519d1af4
5 changed files with 28 additions and 24 deletions

View File

@ -115,10 +115,6 @@ final class FastChunkSerializer{
$biomeIds = new BiomeArray($stream->get(256));
$chunk = new Chunk($subChunks, $biomeIds);
$chunk->setPopulated($terrainPopulated);
$chunk->clearTerrainDirtyFlags();
return $chunk;
return new Chunk($subChunks, $biomeIds, null, $terrainPopulated);
}
}