aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-06-15 15:31:04 -0700
committerSpottedleaf <[email protected]>2024-06-15 15:31:04 -0700
commitb090c65fe04e90e42d95e2d319ace239712f04d2 (patch)
tree38534117201c292d76daa3600e44f6096ae71121
parente339ec27b4ae868499dadaef53bf7f5ed362c753 (diff)
downloadPaper-b090c65fe04e90e42d95e2d319ace239712f04d2.tar.gz
Paper-b090c65fe04e90e42d95e2d319ace239712f04d2.zip
Remove unnecessary changes from chunk status fix
-rw-r--r--leaf_notes.txt17
-rw-r--r--patches/server/0991-Chunk-System-Starlight-from-Moonrise.patch21
2 files changed, 4 insertions, 34 deletions
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/0991-Chunk-System-Starlight-from-Moonrise.patch b/patches/server/0991-Chunk-System-Starlight-from-Moonrise.patch
index a6b6e89827..6b8f2f460b 100644
--- a/patches/server/0991-Chunk-System-Starlight-from-Moonrise.patch
+++ b/patches/server/0991-Chunk-System-Starlight-from-Moonrise.patch
@@ -10995,7 +10995,7 @@ index 0000000000000000000000000000000000000000..f52e104b3e07825caf0d6d1bda2e45c8
+}
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
new file mode 100644
-index 0000000000000000000000000000000000000000..cbc48ffafd3afd8d9f71790fafd15fcecfcedd78
+index 0000000000000000000000000000000000000000..545624cfeefacc7bff3bb24adc9b6d52672db701
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
@@ -0,0 +1,2014 @@
@@ -11976,8 +11976,8 @@ index 0000000000000000000000000000000000000000..cbc48ffafd3afd8d9f71790fafd15fce
+ 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) {
@@ -22983,7 +22983,7 @@ index c643bb0daa5cd264fd6ebab7acf0a2bdd7fe7029..0048077dedd19adc6c5a88e7d916d88a
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkLevel.java b/src/main/java/net/minecraft/server/level/ChunkLevel.java
-index d9ad32acdf46a43a649334a3b736aeb7b3af21d1..e56b9333a4d99fa6a94e923cb5e8c7544c6309bf 100644
+index d9ad32acdf46a43a649334a3b736aeb7b3af21d1..fae17a075d7efaf24d916877dd5968eb9652bb66 100644
--- a/src/main/java/net/minecraft/server/level/ChunkLevel.java
+++ b/src/main/java/net/minecraft/server/level/ChunkLevel.java
@@ -7,9 +7,9 @@ import net.minecraft.world.level.chunk.status.ChunkStep;
@@ -22999,19 +22999,6 @@ index d9ad32acdf46a43a649334a3b736aeb7b3af21d1..e56b9333a4d99fa6a94e923cb5e8c754
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;
-@@ -19,6 +19,12 @@ 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 2ce7da9707d7c1a48b5609ae51a516d599d7aee8..b849e0cf15f894aa87b1bb397d85b887b8fb816e 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java