mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 98a702c7d [CI-SKIP] [Auto] Rebuild Patches cab361600 Expose LivingEntity hurt direction 7ef05fbd8 Do not perform neighbour updates when using debug stick (Fixes #2134)
This commit is contained in:
39
patches/server/0059-Configurable-TPS-Catchup.patch
Normal file
39
patches/server/0059-Configurable-TPS-Catchup.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
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 fe3b76e4ed11f0183731a0dcc39a323ccee3fd2e..2d01bc9c5f95e7bd950a8c9137d1a1ab74a6cb72 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1003,7 +1003,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 7e4136f62e409c03d4d10aaf11526fb685d0701d..403148774d880580412888a7c03c11da380149d7 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -189,4 +189,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);
|
||||
+ }
|
||||
}
|
||||
Reference in New Issue
Block a user