Skip to content
This repository
Browse code

Merge pull request #410 from Glitchfinder/master

Fixing a concurrent modification error.
  • Loading branch information...
commit 4161952566f2fa404826fadfca4cda185e70f9db 2 parents 48150e2 + 5b18abb
Sean Porter Glitchfinder authored
6 src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java
@@ -222,7 +222,8 @@ public synchronized void saveChunk(int cx, int cz, World world) {
222 222
223 223 boolean unloaded = false;
224 224 if(!store.containsKey(world.getName() + "," + cx + "," + cz)) {
225   - for(Entity entity : spawnedMobs) {
  225 + List<Entity> tempSpawnedMobs = new ArrayList<Entity>(spawnedMobs);
  226 + for(Entity entity : tempSpawnedMobs) {
226 227 if(!isEntityInChunk(entity, cx, cz, world))
227 228 continue;
228 229
@@ -232,7 +233,8 @@ public synchronized void saveChunk(int cx, int cz, World world) {
232 233 }
233 234
234 235 if(!unloaded) {
235   - for(Entity entity : spawnedPets) {
  236 + List<Entity> tempSpawnedPets = new ArrayList<Entity>(spawnedPets);
  237 + for(Entity entity : tempSpawnedPets) {
236 238 if(!isEntityInChunk(entity, cx, cz, world))
237 239 continue;
238 240

0 comments on commit 4161952

Please sign in to comment.
Something went wrong with that request. Please try again.