diff --git a/Spigot-Server-Patches/0532-Unload-leaked-Cached-Chunks.patch b/Spigot-Server-Patches/0532-Unload-leaked-Cached-Chunks.patch index fcb194b96..0f4c508bd 100644 --- a/Spigot-Server-Patches/0532-Unload-leaked-Cached-Chunks.patch +++ b/Spigot-Server-Patches/0532-Unload-leaked-Cached-Chunks.patch @@ -18,10 +18,10 @@ We will now detect these chunks in that iteration, and automatically add it to the unload queue when the chunk is found without any tickets. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 54e89c9cc6c47ff2c4f4dd5d4c22a391f8a3d6e0..899a49974acf60eb7a160a4b55d1ab389249d3b0 100644 +index 54e89c9cc6c47ff2c4f4dd5d4c22a391f8a3d6e0..af4ffef0466966f0d333431e72163486dc3ba49d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -898,6 +898,29 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -898,6 +898,33 @@ public class ChunkProviderServer extends IChunkProvider { if (chunksTicked[0]++ % 10 == 0) this.world.getMinecraftServer().midTickLoadChunks(); // Paper } } @@ -36,6 +36,10 @@ index 54e89c9cc6c47ff2c4f4dd5d4c22a391f8a3d6e0..899a49974acf60eb7a160a4b55d1ab38 + if (chunkHolderStatus != null && !chunkHolderStatus.isAtLeastStatus(desiredStatus)) { + return; + } ++ if (playerchunk.lastActivity == 0) { ++ playerchunk.lastActivity = world.getTime(); ++ return; ++ } + playerchunk.lastActivity = world.getTime(); + Chunk chunk = playerchunk.getChunk(); + if ((chunk != null && chunk.isAnyNeighborsLoaded()) || !playerchunk.neighborPriorities.isEmpty()) {