mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Don't tick chunks or entities on chunks that are queued for unload.
Treat chunks in the unload queue as if they are already unloaded to prevent processing on them removing them from the unload queue and leaking.
This commit is contained in:
@@ -23,7 +23,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
public Chunk emptyChunk;
|
||||
public IChunkProvider chunkProvider; // CraftBukkit
|
||||
private IChunkLoader e;
|
||||
public boolean forceChunkLoad = false; // true -> false
|
||||
public boolean forceChunkLoad = true;
|
||||
public LongHashtable<Chunk> chunks = new LongHashtable<Chunk>();
|
||||
public List chunkList = new ArrayList();
|
||||
public WorldServer world;
|
||||
@@ -37,7 +37,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
}
|
||||
|
||||
public boolean isChunkLoaded(int i, int j) {
|
||||
return this.chunks.containsKey(i, j); // CraftBukkit
|
||||
return !this.unloadQueue.containsKey(i, j) && this.chunks.containsKey(i, j); // CraftBukkit
|
||||
}
|
||||
|
||||
public void queueUnload(int i, int j) {
|
||||
|
Reference in New Issue
Block a user