mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 19:59:11 +00:00
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:
@@ -88,13 +88,13 @@ trait LegacyAnvilChunkTrait{
|
||||
$biomeArray = $makeBiomeArray($biomesTag->getValue());
|
||||
}
|
||||
|
||||
$result = new Chunk(
|
||||
$subChunks,
|
||||
$biomeArray
|
||||
);
|
||||
$result->setPopulated($chunk->getByte("TerrainPopulated", 0) !== 0);
|
||||
return new ChunkData(
|
||||
$result,
|
||||
new Chunk(
|
||||
$subChunks,
|
||||
$biomeArray,
|
||||
null,
|
||||
$chunk->getByte("TerrainPopulated", 0) !== 0
|
||||
),
|
||||
($entitiesTag = $chunk->getTag("Entities")) instanceof ListTag ? self::getCompoundList("Entities", $entitiesTag) : [],
|
||||
($tilesTag = $chunk->getTag("TileEntities")) instanceof ListTag ? self::getCompoundList("TileEntities", $tilesTag) : [],
|
||||
);
|
||||
|
Reference in New Issue
Block a user