From 9d9fcf7e62af977ff925904673d8354817ff3080 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:25:12 -0700 Subject: [PATCH] fix timings patch field use --- patches/server/0014-Timings-v2.patch | 6 +++--- patches/server/0018-Rewrite-chunk-system.patch | 2 +- ...ow-Paper-in-client-crashes-server-lists-and-Mojang.patch | 2 +- patches/server/0031-Further-improve-server-tick-loop.patch | 2 +- patches/server/0040-Optimize-explosions.patch | 2 +- ...ly-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch | 2 +- patches/server/0088-Configurable-Player-Collision.patch | 2 +- ...93-remove-null-possibility-for-getServer-singleton.patch | 2 +- patches/server/0098-Async-GameProfileCache-saving.patch | 2 +- ...-Properly-handle-async-calls-to-restart-the-server.patch | 2 +- ...e-TerminalConsoleAppender-for-console-improvements.patch | 2 +- .../0179-Implement-extended-PaperServerListPingEvent.patch | 2 +- .../server/0236-Add-Early-Warning-Feature-to-WatchDog.patch | 2 +- ...5-Improve-Server-Thread-Pool-and-Thread-Priorities.patch | 2 +- patches/server/0276-Optimize-World-Time-Updates.patch | 2 +- patches/server/0293-Async-command-map-building.patch | 2 +- patches/server/0304-Server-Tick-Events.patch | 2 +- ...312-Configurable-Keep-Spawn-Loaded-range-per-world.patch | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/patches/server/0014-Timings-v2.patch b/patches/server/0014-Timings-v2.patch index 3da8649bd1..ebb27f1598 100644 --- a/patches/server/0014-Timings-v2.patch +++ b/patches/server/0014-Timings-v2.patch @@ -712,7 +712,7 @@ index daedf825e68655492f5ab776bc206a5eb87c0170..7de24c39b460e43d27839b3821e67213 } catch (Exception exception) { label25: diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1eb0809addfd77303b94bb594701ee7f38483909..337a1e89ba63471ea6b413cdec3e68d343a0b46b 100644 +index 1eb0809addfd77303b94bb594701ee7f38483909..206751253a02a5f144bbf7bfc5401577767e9030 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main; @@ -743,11 +743,11 @@ index 1eb0809addfd77303b94bb594701ee7f38483909..337a1e89ba63471ea6b413cdec3e68d3 + // Paper start + boolean isOversleep = false; + private boolean canOversleep() { -+ return this.mayHaveDelayedTasks && Util.getMillis() < this.delayedTasksMaxNextTickTime; ++ return this.mayHaveDelayedTasks && Util.getNanos() < this.delayedTasksMaxNextTickTimeNanos; + } + + private boolean canSleepForTickNoOversleep() { -+ return this.forceTicks || this.runningTask() || Util.getMillis() < this.nextTickTime; ++ return this.forceTicks || this.runningTask() || Util.getNanos() < this.nextTickTimeNanos; + } + // Paper end + diff --git a/patches/server/0018-Rewrite-chunk-system.patch b/patches/server/0018-Rewrite-chunk-system.patch index b6673497db..a85049b52c 100644 --- a/patches/server/0018-Rewrite-chunk-system.patch +++ b/patches/server/0018-Rewrite-chunk-system.patch @@ -16652,7 +16652,7 @@ index 884731fa4ebbbdc7c06ff670941f36ef3bf384ad..360ecf561cde34b07929519a67485e03 DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 337a1e89ba63471ea6b413cdec3e68d343a0b46b..2021526bf6b8bdc286c31aaa62ab0235fac073cd 100644 +index 206751253a02a5f144bbf7bfc5401577767e9030..b608788552d380328b729ce6164e0fc60cf3fefd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -300,7 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop