Improve chunk unload queue to maintain some previous expectations
While the previous logic was logically correct, some CB API's before would request a chunk without removing it from the unload queue. While this is logically wrong, some plugins seem to be causing unload issues. This change will make anything using that one API that use to not remove from queue, no longer remove from queue. Hopefully other activities on the server will touch the chunk if it REALLY is in use.
This commit is contained in:
@@ -15,12 +15,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start
|
||||
+ public Chunk getChunkIfLoaded(BlockPosition blockposition) {
|
||||
+ return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ return this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public Chunk getChunkIfLoaded(int x, int z) {
|
||||
return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z);
|
||||
return ((ChunkProviderServer) this.chunkProvider).getLoadedChunkAtWithoutMarkingActive(x, z); // Paper - This is added by CB, and will not mark as active. Simply an alias
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user