mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Assume chunks are dirty by default
having them be clean by default makes no sense. It only makes sense for them to be clean if they were loaded directly from disk without any alterations. Default clean is a footgun.
This commit is contained in:
@ -2717,7 +2717,13 @@ class World implements ChunkManager{
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->chunks[$chunkHash] = $loadedChunkData->getData()->getChunk();
|
||||
$chunk = $loadedChunkData->getData()->getChunk();
|
||||
if(!$loadedChunkData->isUpgraded()){
|
||||
$chunk->clearTerrainDirtyFlags();
|
||||
}else{
|
||||
$this->logger->debug("Chunk $x $z has been upgraded, will be saved at the next autosave opportunity");
|
||||
}
|
||||
$this->chunks[$chunkHash] = $chunk;
|
||||
unset($this->blockCache[$chunkHash]);
|
||||
|
||||
$this->initChunk($x, $z, $loadedChunkData->getData());
|
||||
|
Reference in New Issue
Block a user