2021-08-26 02:16:27 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Mon, 1 Feb 2021 15:35:14 -0800
|
|
|
|
Subject: [PATCH] Fix chunks refusing to unload at low TPS
|
|
|
|
|
|
|
|
The full chunk future is appended to the chunk save future, but
|
|
|
|
when moving to unloaded ticket level it is not being completed with
|
|
|
|
the empty chunk access, so the chunk save must wait for the full
|
|
|
|
chunk future to complete. We can simply schedule to the immediate
|
|
|
|
executor to get this effect, rather than the main mailbox.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
2021-12-27 11:53:25 +00:00
|
|
|
index 76f40342098c1cc1ffb855ef41349953f8b94d0f..0090ef1df54c5b438bc4b23d2ed8978575e48dae 100644
|
2021-08-26 02:16:27 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
2021-12-27 11:53:25 +00:00
|
|
|
@@ -1253,9 +1253,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
2021-11-25 03:06:43 +00:00
|
|
|
|
2021-08-26 02:16:27 +00:00
|
|
|
return chunk;
|
|
|
|
});
|
|
|
|
- }, (runnable) -> {
|
|
|
|
- this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(playerchunk, runnable));
|
|
|
|
- });
|
|
|
|
+ }, this.mainThreadExecutor); // Paper - queue to execute immediately so this doesn't delay chunk unloading
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getTickingGenerated() {
|