Fixed a concurrentmodificationexception crash with Energy Laser Relays

This commit is contained in:
Ellpeck 2016-08-07 12:37:08 +02:00
parent 9c0fc504b7
commit 18fd699121
2 changed files with 4 additions and 4 deletions

View file

@ -23,13 +23,13 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements IEnergyReceiver{ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements IEnergyReceiver{
public final Map<EnumFacing, TileEntity> receiversAround = new HashMap<EnumFacing, TileEntity>(); public final ConcurrentHashMap<EnumFacing, TileEntity> receiversAround = new ConcurrentHashMap<EnumFacing, TileEntity>();
public static final int CAP = 1000; public static final int CAP = 1000;

View file

@ -22,13 +22,13 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class TileEntityLaserRelayItem extends TileEntityLaserRelay{ public class TileEntityLaserRelayItem extends TileEntityLaserRelay{
public final Map<BlockPos, IItemHandler> handlersAround = new HashMap<BlockPos, IItemHandler>(); public final Map<BlockPos, IItemHandler> handlersAround = new ConcurrentHashMap<BlockPos, IItemHandler>();
public TileEntityLaserRelayItem(String name){ public TileEntityLaserRelayItem(String name){
super(name, true); super(name, true);