aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0993-disable-forced-empty-world-ticks.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-06-16 14:09:44 -0700
committerSpottedleaf <[email protected]>2024-06-16 14:09:44 -0700
commitf8ee0a06c563864f1f703937155a9c27e1c93eb0 (patch)
tree15f133d5c43a1a6481c96f3a272ce5890ac731a9 /patches/server/0993-disable-forced-empty-world-ticks.patch
parentd9111ccec278132052cebdebca9f1c6dcaba9512 (diff)
downloadPaper-f8ee0a06c563864f1f703937155a9c27e1c93eb0.tar.gz
Paper-f8ee0a06c563864f1f703937155a9c27e1c93eb0.zip
Fix implementations of ChunkHolder#getChunkIfPresent
Implementations for ChunkStatuses below FULL are supposed to always return ProtoChunk instances. However, since we used the last completed status, it could return LevelChunk. To resolve this, follow Vanilla behavior of tracking chunk completions by status and replace old ProtoChunk statuses with ImposterProtoChunk when the chunk generates to FULL. Additionally, implement an optimisation for retrieving full chunks by storing a map of pos -> LevelChunk. This requires only a simple map lookup to occur for full chunks which are loaded.
Diffstat (limited to 'patches/server/0993-disable-forced-empty-world-ticks.patch')
-rw-r--r--patches/server/0993-disable-forced-empty-world-ticks.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0993-disable-forced-empty-world-ticks.patch b/patches/server/0993-disable-forced-empty-world-ticks.patch
index e33cae412e..d53a1146fd 100644
--- a/patches/server/0993-disable-forced-empty-world-ticks.patch
+++ b/patches/server/0993-disable-forced-empty-world-ticks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] disable forced empty world ticks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 37971d9fc59ecf3736fccf7a27f17e37a56efeb9..ec8eec86876221686f152bc5b25304cc59791cac 100644
+index 34cb1947f7ce69828115d1473d14732934364985..9990488a1dbf5d7fe54ecf6336cc6c3bca20168a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -697,7 +697,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
+@@ -696,7 +696,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.handlingTick = false;
gameprofilerfiller.pop();