diff options
author | Mike Primm <mike@primmhome.com> | 2012-08-11 17:34:22 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-08-19 09:51:00 -0500 |
commit | 627cf2ef8b6271c46d10a315dc827ecd8bf8e517 (patch) | |
tree | 238295d2943a81fd70bc72173861cf8f580061ab /src/main/java/org/bukkit | |
parent | 97ac0a3f145ab7e2c20ece3ed0f45f2f90a645c1 (diff) | |
download | craftbukkit-627cf2ef8b6271c46d10a315dc827ecd8bf8e517.tar craftbukkit-627cf2ef8b6271c46d10a315dc827ecd8bf8e517.tar.gz craftbukkit-627cf2ef8b6271c46d10a315dc827ecd8bf8e517.tar.lz craftbukkit-627cf2ef8b6271c46d10a315dc827ecd8bf8e517.tar.xz craftbukkit-627cf2ef8b6271c46d10a315dc827ecd8bf8e517.zip |
[Bleeding] Remove redundant chunkList from ChunkProviderServer
This ArrayList duplicates part of the functionality of the much more
efficient chunk map so can be removed as the map can be used in the few
places this was needed.
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 30e80c50..0f788626 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -164,7 +164,9 @@ public class CraftWorld implements World { if (chunk.mustSave) { // If chunk had previously been queued to save, must do save to avoid loss of that data save = true; } + chunk.removeEntities(); // Always remove entities - even if discarding, need to get them out of world table + if (save && !(chunk instanceof EmptyChunk)) { world.chunkProviderServer.saveChunk(chunk); world.chunkProviderServer.saveChunkNOP(chunk); @@ -172,7 +174,6 @@ public class CraftWorld implements World { world.chunkProviderServer.unloadQueue.remove(x, z); world.chunkProviderServer.chunks.remove(x, z); - world.chunkProviderServer.chunkList.remove(chunk); return true; } @@ -242,7 +243,6 @@ public class CraftWorld implements World { private void chunkLoadPostProcess(net.minecraft.server.Chunk chunk, int x, int z) { if (chunk != null) { world.chunkProviderServer.chunks.put(x, z, chunk); - world.chunkProviderServer.chunkList.add(chunk); chunk.addEntities(); |