Fixed Anvil/McRegion chunks getting autosaved on first time, even when unchanged

setGenerated/setPopulated and friends set hasChanged = true, which causes the world to autosave them the first time around, even though they weren't modified.
This commit is contained in:
Dylan K. Taylor 2021-10-25 19:52:44 +01:00
parent 986b4e0651
commit f6e53f826b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 2 additions and 0 deletions

View File

@ -135,6 +135,7 @@ class Anvil extends McRegion{
$result->setLightPopulated($chunk->getByte("LightPopulated", 0) !== 0);
$result->setPopulated($chunk->getByte("TerrainPopulated", 0) !== 0);
$result->setGenerated();
$result->setChanged(false);
return $result;
}

View File

@ -201,6 +201,7 @@ class McRegion extends BaseLevelProvider{
$result->setLightPopulated($chunk->getByte("LightPopulated", 0) !== 0);
$result->setPopulated($chunk->getByte("TerrainPopulated", 0) !== 0);
$result->setGenerated(true);
$result->setChanged(false);
return $result;
}