Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing a concurrent modification error.

  • Loading branch information...
commit 5b18abbea01676a4a416eb171bf8e757dc6a622f 1 parent 707a388
@Glitchfinder Glitchfinder authored
View
6 src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java
@@ -223,7 +223,8 @@ public synchronized void saveChunk(int cx, int cz, World world) {
boolean unloaded = false;
if(!store.containsKey(world.getName() + "," + cx + "," + cz)) {
- for(Entity entity : spawnedMobs) {
+ List<Entity> tempSpawnedMobs = new ArrayList<Entity>(spawnedMobs);
+ for(Entity entity : tempSpawnedMobs) {
if(!isEntityInChunk(entity, cx, cz, world))
continue;
@@ -233,7 +234,8 @@ public synchronized void saveChunk(int cx, int cz, World world) {
}
if(!unloaded) {
- for(Entity entity : spawnedPets) {
+ List<Entity> tempSpawnedPets = new ArrayList<Entity>(spawnedPets);
+ for(Entity entity : tempSpawnedPets) {
if(!isEntityInChunk(entity, cx, cz, world))
continue;
Please sign in to comment.
Something went wrong with that request. Please try again.