Updated Upstream (Pufferfish)

Upstream has released updates that appear to apply and compile correctly

Pufferfish Changes:
pufferfish-gg/Pufferfish@d3365b7 Updated Upstream (Paper)
pufferfish-gg/Pufferfish@8043ed7 Port TPS catchup patch
pufferfish-gg/Pufferfish@5b40739 Fix #88
pufferfish-gg/Pufferfish@8d20921 Updated Upstream (Paper)
pufferfish-gg/Pufferfish@6ca0bf8 Updated Upstream (Paper)
pufferfish-gg/Pufferfish@cb1794b Async world saving
This commit is contained in:
granny
2024-01-16 12:51:22 -08:00
parent e4d30e02fd
commit 486515bc3c
11 changed files with 219 additions and 80 deletions

View File

@@ -5,20 +5,25 @@ Subject: [PATCH] Configurable TPS Catchup
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9c176d77420ffe0acdb57b333602c5e2102660a6..9b757a89bc00deef41bd9adc614bbeff30975034 100644
index c5ee8232e13ae837e2f40fbf07ed1002a4c4a620..5dc1216684146dc34fd21eaf829aa59f11efac0c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1220,7 +1220,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} : this::haveTime);
this.profiler.popPush("nextTickWait");
@@ -1222,11 +1222,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.mayHaveDelayedTasks = true;
- this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
// Pufferfish start - tps catchup
- if (!gg.pufferfish.pufferfish.PufferfishConfig.tpsCatchup) {
+ if (!org.purpurmc.purpur.PurpurConfig.tpsCatchup || !gg.pufferfish.pufferfish.PufferfishConfig.tpsCatchup) {
this.nextTickTimeNanos = curTime + i;
this.delayedTasksMaxNextTickTimeNanos = nextTickTimeNanos;
}
// Pufferfish end
+ // Purpur start - tps catchup
+ if (org.purpurmc.purpur.PurpurConfig.tpsCatchup) {
+ this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
+ } else {
+ this.delayedTasksMaxNextTickTimeNanos = this.nextTickTimeNanos = curTime + i;
+ }
+ //if (org.purpurmc.purpur.PurpurConfig.tpsCatchup) {
+ // this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
+ //} else {
+ // this.delayedTasksMaxNextTickTimeNanos = this.nextTickTimeNanos = curTime + i;
+ //}
+ // Purpur end - tps catchup
this.waitUntilNextTick();
if (flag) {