From 7d6c55f960c8a89a2c75105786a1068239670b12 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 6 Dec 2023 22:40:08 +0100 Subject: [PATCH] Fix timings check with tick freezes --- patches/server/Optimise-chunk-tick-iteration.patch | 2 +- patches/server/Timings-v2.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/Optimise-chunk-tick-iteration.patch b/patches/server/Optimise-chunk-tick-iteration.patch index 3f45a66a71..cc75515a95 100644 --- a/patches/server/Optimise-chunk-tick-iteration.patch +++ b/patches/server/Optimise-chunk-tick-iteration.patch @@ -196,7 +196,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 gameprofilerfiller.push("filteringLoadedChunks"); - List list = Lists.newArrayListWithCapacity(this.chunkMap.size()); - Iterator iterator = this.chunkMap.getChunks().iterator(); - this.level.timings.chunkTicks.startTiming(); // Paper + if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper - while (iterator.hasNext()) { - ChunkHolder playerchunk = (ChunkHolder) iterator.next(); diff --git a/patches/server/Timings-v2.patch b/patches/server/Timings-v2.patch index d163f16fc8..d4ce1dfec4 100644 --- a/patches/server/Timings-v2.patch +++ b/patches/server/Timings-v2.patch @@ -1079,7 +1079,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 gameprofilerfiller.push("filteringLoadedChunks"); List list = Lists.newArrayListWithCapacity(this.chunkMap.size()); Iterator iterator = this.chunkMap.getChunks().iterator(); -+ this.level.timings.chunkTicks.startTiming(); // Paper ++ if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper while (iterator.hasNext()) { ChunkHolder playerchunk = (ChunkHolder) iterator.next();