Protect against concurrent modification

This commit is contained in:
DarkholmeTenk 2014-02-22 13:43:11 +00:00
parent d9289e3e1b
commit 6c8db048e4

View file

@ -21,9 +21,14 @@ public abstract class WarpChunkTE extends TileEntity
protected ChunkCoordIntPair maxChunk = null;
boolean areChunksLoaded = false;
boolean isRefreshing = false;
public void refreshLoading(boolean force)
{
if(isRefreshing)
return;
isRefreshing = true;
boolean load = shouldChunkLoad();
if(ticketList.size() != 0)
{
@ -76,6 +81,7 @@ public abstract class WarpChunkTE extends TileEntity
{
WarpDrive.instance.registerChunkLoadTE(this);
}
isRefreshing = false;
}
public void refreshLoading()