mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 0081e8ef8 Fix plugin provides not being listed behind name in /plugins (#4825) 9119af508 Fix keep-spawn-loaded stopping force-loaded chunks from loading
40 lines
2.1 KiB
Diff
40 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Thu, 26 Mar 2020 19:06:22 -0500
|
|
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 7c7010aa5d..2c432a3cf6 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1000,7 +1000,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
this.a(this::canSleepForTick);
|
|
this.methodProfiler.exitEnter("nextTickWait");
|
|
this.X = true;
|
|
- this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
+ // Purpur start - tps catchup
|
|
+ if (net.pl3x.purpur.PurpurConfig.tpsCatchup) {
|
|
+ this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
+ } else {
|
|
+ this.W = this.nextTick = curTime / 1000000L + 50L;
|
|
+ }
|
|
+ // Purpur end - tps catchup
|
|
this.sleepForTick();
|
|
this.methodProfiler.exit();
|
|
this.methodProfiler.b();
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index fd2bf433a1..e83a9632a7 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -194,4 +194,9 @@ public class PurpurConfig {
|
|
loggerSuppressInitLegacyMaterialError = getBoolean("settings.logger.suppress-init-legacy-material-errors", loggerSuppressInitLegacyMaterialError);
|
|
loggerSuppressIgnoredAdvancementWarnings = getBoolean("settings.logger.suppress-ignored-advancement-warnings", loggerSuppressIgnoredAdvancementWarnings);
|
|
}
|
|
+
|
|
+ public static boolean tpsCatchup = true;
|
|
+ private static void tpsCatchup() {
|
|
+ tpsCatchup = getBoolean("settings.tps-catchup", tpsCatchup);
|
|
+ }
|
|
}
|