diff --git a/leaf_notes.txt b/leaf_notes.txt index 7461a327b9..6196c3d607 100644 --- a/leaf_notes.txt +++ b/leaf_notes.txt @@ -5,23 +5,6 @@ - paper debug chunks --async in DedicatedServer - TODO keep around region file lock? - mcutil#getTicketLevelFor is wrong, just delete it later -- in the mod: - - ChunkHolder - - isReadyForSaving overwrite - - remove state fields in mod - - addSaveDependency overwrite - - ChunkMap - - pendingUnloads/pendingGenerationTasks/unloadQueue/ field destroy - - DistanceManager - - getTickets/dumpTickets/tickingTracker/ overwrite - - GenerationChunkHolder - - remove state fields in mod - - rescheduleChunkTask/failAndClearPendingFuturesBetween/failAndClearPendingFuture/completeFuture/ - findHighestStatusWithPendingFuture/acquireStatusBump/isStatusDisallowed/ overwrite - - LayerLightEngine - - getDebugSectionType overwrite - - ThreadedLayerLightEngine - - waitForPendingTasks overwrite on another note, clean up mcutils... diff --git a/patches/server/Chunk-System-Starlight-from-Moonrise.patch b/patches/server/Chunk-System-Starlight-from-Moonrise.patch index e008ccdde2..446e4e7c6f 100644 --- a/patches/server/Chunk-System-Starlight-from-Moonrise.patch +++ b/patches/server/Chunk-System-Starlight-from-Moonrise.patch @@ -11976,8 +11976,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + final boolean oldUnloaded = oldLevel > ChunkHolderManager.MAX_TICKET_LEVEL; + final boolean newUnloaded = newLevel > ChunkHolderManager.MAX_TICKET_LEVEL; + -+ final ChunkStatus maxGenerationStatusOld = ChunkLevel.generationStatusOrEmpty(oldLevel); -+ final ChunkStatus maxGenerationStatusNew = ChunkLevel.generationStatusOrEmpty(newLevel); ++ final ChunkStatus maxGenerationStatusOld = ChunkLevel.generationStatus(oldLevel); ++ final ChunkStatus maxGenerationStatusNew = ChunkLevel.generationStatus(newLevel); + + // check for cancellations from downgrading ticket level + if (this.requestedGenStatus != null && !newState.isOrAfter(FullChunkStatus.FULL) && newLevel > oldLevel) { @@ -22999,19 +22999,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private static final ChunkStep FULL_CHUNK_STEP = ChunkPyramid.GENERATION_PYRAMID.getStepTo(ChunkStatus.FULL); public static final int RADIUS_AROUND_FULL_CHUNK = FULL_CHUNK_STEP.accumulatedDependencies().getRadius(); public static final int MAX_LEVEL = 33 + RADIUS_AROUND_FULL_CHUNK; -@@ -0,0 +0,0 @@ public class ChunkLevel { - return getStatusAroundFullChunk(level - 33, null); - } - -+ // Paper start - rewrite chunk system -+ public static ChunkStatus generationStatusOrEmpty(int level) { -+ return getStatusAroundFullChunk(level - 33, ChunkStatus.EMPTY); -+ } -+ // Paper end - rewrite chunk system -+ - @Nullable - @Contract("_,!null->!null;_,_->_") - public static ChunkStatus getStatusAroundFullChunk(int additionalLevel, @Nullable ChunkStatus emptyStatus) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java