mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 19:46:21 +01:00
Fixed chunks being overwritten with empty chunks when the memory setting is immediately changed after a world loads.
This commit is contained in:
parent
f795055012
commit
96a0e87068
@ -800,7 +800,13 @@ public class CraftWorld implements World {
|
||||
if (keepLoaded) {
|
||||
loadChunk(chunkCoordX + x, chunkCoordZ + z);
|
||||
} else {
|
||||
unloadChunk(chunkCoordX + x, chunkCoordZ + z);
|
||||
if (isChunkLoaded(chunkCoordX + x, chunkCoordZ + z)) {
|
||||
if (this.getHandle().getChunkAt(chunkCoordX + x, chunkCoordZ + z).isEmpty()) {
|
||||
unloadChunk(chunkCoordX + x, chunkCoordZ + z, false);
|
||||
} else {
|
||||
unloadChunk(chunkCoordX + x, chunkCoordZ + z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user