diff --git a/patches/server/0881-Fix-save-problems-on-shutdown.patch b/patches/server/0881-Fix-save-problems-on-shutdown.patch index bb39b0fdd8..97b9516f09 100644 --- a/patches/server/0881-Fix-save-problems-on-shutdown.patch +++ b/patches/server/0881-Fix-save-problems-on-shutdown.patch @@ -8,9 +8,11 @@ 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 17e87875a95495940899b862eabf98b3d6a365da..e25c9a9ccab67a018c2e58e13b24089bc2ce538f 100644 +index 17e87875a95495940899b862eabf98b3d6a365da..39b7c78b032ed6fc29ac765020d5a38858bf2a3a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -998,6 +998,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver1.getChunkSource().chunkMap.hasWork(); })) { -@@ -1010,9 +1017,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return true; }, false); @@ -35,10 +37,23 @@ index 17e87875a95495940899b862eabf98b3d6a365da..e25c9a9ccab67a018c2e58e13b24089b } - this.waitUntilNextTick(); ++ this.forceTicks = true; // Paper + while (this.pollTask()); // Paper - drain tasks } this.saveAllChunks(false, true, false); +@@ -1308,6 +1317,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop