From 18fd6991211c39fcd34a911cb33790cad6ba7f3d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 7 Aug 2016 12:37:08 +0200 Subject: [PATCH] Fixed a concurrentmodificationexception crash with Energy Laser Relays --- .../mod/tile/TileEntityLaserRelayEnergy.java | 4 ++-- .../actuallyadditions/mod/tile/TileEntityLaserRelayItem.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index 2085346fd..718abc0d1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -23,13 +23,13 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements IEnergyReceiver{ - public final Map receiversAround = new HashMap(); + public final ConcurrentHashMap receiversAround = new ConcurrentHashMap(); public static final int CAP = 1000; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java index 8dcb1f6b7..99c7faa45 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java @@ -22,13 +22,13 @@ import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayItem extends TileEntityLaserRelay{ - public final Map handlersAround = new HashMap(); + public final Map handlersAround = new ConcurrentHashMap(); public TileEntityLaserRelayItem(String name){ super(name, true);