diff --git a/Spigot-Server-Patches/Unload-leaked-Cached-Chunks.patch b/Spigot-Server-Patches/Unload-leaked-Cached-Chunks.patch index 4eed41cb0a..02f5df65ab 100644 --- a/Spigot-Server-Patches/Unload-leaked-Cached-Chunks.patch +++ b/Spigot-Server-Patches/Unload-leaked-Cached-Chunks.patch @@ -28,7 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - remove inaccessible chunks leaked + else if (playerchunk.getTicketLevel() == playerchunk.oldTicketLevel && + playerChunkMap.unloadQueue.size() < 100 && -+ (playerchunk.lastActivity == 0 || world.getTime() - playerchunk.lastActivity > 20*15) && ++ (playerchunk.lastActivity == 0 || world.getTime() - playerchunk.lastActivity > 20*180) && + PlayerChunk.getChunkState(playerchunk.getTicketLevel()) == PlayerChunk.State.INACCESSIBLE + ) { + ChunkStatus chunkHolderStatus = playerchunk.getChunkHolderStatus(); @@ -87,6 +87,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ChunkStatus chunkstatus = (ChunkStatus) intfunction.apply(j1); CompletableFuture> completablefuture = playerchunk.a(chunkstatus, this); +@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + if (requestingNeighbor != null && requestingNeighbor != playerchunk && !completablefuture.isDone()) { + requestingNeighbor.onNeighborRequest(playerchunk, chunkstatus); + completablefuture.thenAccept(either -> { ++ playerchunk.lastActivity = world.getTime(); // Paper - chunk leak + requestingNeighbor.onNeighborDone(playerchunk, chunkstatus, either.left().orElse(null)); + }); + } @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { while (longiterator.hasNext()) { // Spigot long j = longiterator.nextLong();