Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixing a concurrent modification error. #410

Merged
merged 1 commit into from

1 participant

@Glitchfinder
Owner

This addresses issue #408.

@Glitchfinder Glitchfinder merged commit 4161952 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 2, 2013
  1. @Glitchfinder
This page is out of date. Refresh to see the latest.
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;
Something went wrong with that request. Please try again.