Protect against concurrent modification
This commit is contained in:
parent
d9289e3e1b
commit
6c8db048e4
1 changed files with 6 additions and 0 deletions
|
@ -21,9 +21,14 @@ public abstract class WarpChunkTE extends TileEntity
|
||||||
protected ChunkCoordIntPair maxChunk = null;
|
protected ChunkCoordIntPair maxChunk = null;
|
||||||
|
|
||||||
boolean areChunksLoaded = false;
|
boolean areChunksLoaded = false;
|
||||||
|
boolean isRefreshing = false;
|
||||||
|
|
||||||
public void refreshLoading(boolean force)
|
public void refreshLoading(boolean force)
|
||||||
{
|
{
|
||||||
|
if(isRefreshing)
|
||||||
|
return;
|
||||||
|
|
||||||
|
isRefreshing = true;
|
||||||
boolean load = shouldChunkLoad();
|
boolean load = shouldChunkLoad();
|
||||||
if(ticketList.size() != 0)
|
if(ticketList.size() != 0)
|
||||||
{
|
{
|
||||||
|
@ -76,6 +81,7 @@ public abstract class WarpChunkTE extends TileEntity
|
||||||
{
|
{
|
||||||
WarpDrive.instance.registerChunkLoadTE(this);
|
WarpDrive.instance.registerChunkLoadTE(this);
|
||||||
}
|
}
|
||||||
|
isRefreshing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshLoading()
|
public void refreshLoading()
|
||||||
|
|
Loading…
Reference in a new issue