From 5b18abbea01676a4a416eb171bf8e757dc6a622f Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Tue, 1 Jan 2013 19:25:35 -0800 Subject: [PATCH] Fixing a concurrent modification error. --- .../nossr50/util/blockmeta/chunkmeta/HashChunkManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java b/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java index cc81573ff..442f67eb3 100755 --- a/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java @@ -223,7 +223,8 @@ public class HashChunkManager implements ChunkManager { boolean unloaded = false; if(!store.containsKey(world.getName() + "," + cx + "," + cz)) { - for(Entity entity : spawnedMobs) { + List tempSpawnedMobs = new ArrayList(spawnedMobs); + for(Entity entity : tempSpawnedMobs) { if(!isEntityInChunk(entity, cx, cz, world)) continue; @@ -233,7 +234,8 @@ public class HashChunkManager implements ChunkManager { } if(!unloaded) { - for(Entity entity : spawnedPets) { + List tempSpawnedPets = new ArrayList(spawnedPets); + for(Entity entity : tempSpawnedPets) { if(!isEntityInChunk(entity, cx, cz, world)) continue;