mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-01 14:51:39 +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
1 changed files with 7 additions and 1 deletions
|
@ -799,6 +799,10 @@ public class CraftWorld implements World {
|
||||||
for (int z = -12; z <= 12; z++) {
|
for (int z = -12; z <= 12; z++) {
|
||||||
if (keepLoaded) {
|
if (keepLoaded) {
|
||||||
loadChunk(chunkCoordX + x, chunkCoordZ + z);
|
loadChunk(chunkCoordX + x, chunkCoordZ + z);
|
||||||
|
} else {
|
||||||
|
if (isChunkLoaded(chunkCoordX + x, chunkCoordZ + z)) {
|
||||||
|
if (this.getHandle().getChunkAt(chunkCoordX + x, chunkCoordZ + z).isEmpty()) {
|
||||||
|
unloadChunk(chunkCoordX + x, chunkCoordZ + z, false);
|
||||||
} else {
|
} else {
|
||||||
unloadChunk(chunkCoordX + x, chunkCoordZ + z);
|
unloadChunk(chunkCoordX + x, chunkCoordZ + z);
|
||||||
}
|
}
|
||||||
|
@ -806,3 +810,5 @@ public class CraftWorld implements World {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue