Use a copy list to check for coordinates in the force relay. Closes #1188

This commit is contained in:
Lizbeth Rika committed 2015-07-20 23:16:04 +01:00
1 parent 289a48d3fb
commit 73b2c3c20c
1 file changed
+5 -3
@@ -196,8 +196,9 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
@SubscribeEvent
public void tickEnd(TickEvent event) {
if(event.type == Type.SERVER && event.phase == Phase.END)
for(String s : coordsToCheck.keySet()) {
if(event.type == Type.SERVER && event.phase == Phase.END) {
List<String> coordsToCheckCopy = new ArrayList(coordsToCheck.keySet());
for(String s : coordsToCheckCopy) {
decrCoords(s);
if(checkedCoords.contains(s))
continue;
@@ -255,7 +256,8 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
}
}
}
}
// ConcurrentModificationException failsafe
ArrayList<String> remove = new ArrayList(removeThese);
for(String s : remove) {