From 78866a364df95ac5eb3df4f631b987e0270ecc8f Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 28 Jul 2024 16:18:25 -0700 Subject: [PATCH] Do not allow chunk unloading outside of the regular tick loop Allowing chunk loading to occur at any point via purgeUnload() introduces possible undesirable behavior to occur recursively inside the chunk system. --- patches/server/Moonrise-optimisation-patches.patch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/patches/server/Moonrise-optimisation-patches.patch b/patches/server/Moonrise-optimisation-patches.patch index 60b27cbf9b..63fbe32be7 100644 --- a/patches/server/Moonrise-optimisation-patches.patch +++ b/patches/server/Moonrise-optimisation-patches.patch @@ -25504,6 +25504,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } // CraftBukkit start - modelled on below + public void purgeUnload() { ++ if (true) return; // Paper - rewrite chunk system + this.level.getProfiler().push("purge"); + this.distanceManager.purgeStaleTickets(); + this.runDistanceManagerUpdates(); @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { this.level.getProfiler().popPush("chunks"); if (tickChunks) {