From ffe0d7b99cafb2d3fc097be336c6ee511bd91739 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 5 Mar 2022 17:36:57 -0800 Subject: [PATCH] Add more to the save fixes - Set forceTicks to true, so that player packets are always processed so that the main process queue can be drained --- .../server/Fix-save-problems-on-shutdown.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/patches/server/Fix-save-problems-on-shutdown.patch b/patches/server/Fix-save-problems-on-shutdown.patch index 5487626aba..505ef3de01 100644 --- a/patches/server/Fix-save-problems-on-shutdown.patch +++ b/patches/server/Fix-save-problems-on-shutdown.patch @@ -8,6 +8,8 @@ Subject: [PATCH] Fix save problems on shutdown while waiting for the chunk system to empty, as there's simply too much trash that could prevent them from executing during the chunk source tick (i.e "time left in tick" logic). +- Set forceTicks to true, so that player packets are always + processed so that the main process queue can be drained diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -35,10 +37,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - this.waitUntilNextTick(); ++ this.forceTicks = true; // Paper + while (this.pollTask()); // Paper - drain tasks } this.saveAllChunks(false, true, false); +@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop