Once and for all fixed ConcurrentModificationException
This commit is contained in:
parent
3b64a043df
commit
8e08c9adb8
2 changed files with 5 additions and 3 deletions
|
@ -20,8 +20,8 @@ public abstract class DynamicNetwork<A, N> implements ITransmitterNetwork<A, N>
|
||||||
{
|
{
|
||||||
public HashSet<ITransmitter<N>> transmitters = new HashSet<ITransmitter<N>>();
|
public HashSet<ITransmitter<N>> transmitters = new HashSet<ITransmitter<N>>();
|
||||||
|
|
||||||
public Set<A> possibleAcceptors = Collections.synchronizedSet(new HashSet<A>());
|
public HashSet<A> possibleAcceptors = new HashSet<A>();
|
||||||
public Map<A, ForgeDirection> acceptorDirections = Collections.synchronizedMap(new HashMap<A, ForgeDirection>());
|
public HashMap<A, ForgeDirection> acceptorDirections = new HashMap<A, ForgeDirection>();
|
||||||
|
|
||||||
protected int ticksSinceCreate = 0;
|
protected int ticksSinceCreate = 0;
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,9 @@ public class EnergyNetwork extends DynamicNetwork<TileEntity, EnergyNetwork>
|
||||||
{
|
{
|
||||||
Set<TileEntity> toReturn = new HashSet<TileEntity>();
|
Set<TileEntity> toReturn = new HashSet<TileEntity>();
|
||||||
|
|
||||||
for(TileEntity acceptor : possibleAcceptors)
|
Set<TileEntity> copy = (Set<TileEntity>)possibleAcceptors.clone();
|
||||||
|
|
||||||
|
for(TileEntity acceptor : copy)
|
||||||
{
|
{
|
||||||
if(acceptor instanceof IStrictEnergyAcceptor)
|
if(acceptor instanceof IStrictEnergyAcceptor)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue