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:
Aikar
2016-03-20 00:13:20 -04:00
parent 86800546bf
commit db0f31134f
2 changed files with 57 additions and 10 deletions

View File

@@ -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 {
}