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
|
2022-06-08 10:20:57 +00:00
|
|
|
index cf5dd1f83e3fa3fce9e40a38733c0238305a2bb3..63ef27cf48071eca0f6450e6276f956d94b7dd59 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
|
2022-06-08 10:20:57 +00:00
|
|
|
@@ -1326,9 +1326,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
2022-03-01 04:11:35 +00:00
|
|
|
|
|
|
|
return chunk;
|
2021-08-26 02:16:27 +00:00
|
|
|
});
|
|
|
|
- }, (runnable) -> {
|
2022-03-01 04:11:35 +00:00
|
|
|
- this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable));
|
2021-08-26 02:16:27 +00:00
|
|
|
- });
|
|
|
|
+ }, this.mainThreadExecutor); // Paper - queue to execute immediately so this doesn't delay chunk unloading
|
|
|
|
}
|
|
|
|
|
2022-03-01 04:11:35 +00:00
|
|
|
public int getTickingGenerated() {
|