Skip to content

Commit

Permalink
Use redstone game time for saving chunk tick list
Browse files Browse the repository at this point in the history
  • Loading branch information
Spottedleaf committed Nov 27, 2024
1 parent 97805cb commit 88f8af4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/server/0003-Threaded-Regions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19094,6 +19094,19 @@ index 4640baec5bed6c2d53cc0f8ca1d273cc115abe9b..877f68f9abfc659f489d6571efc1b431
@Override
public void tick() {
if (!this.blockEntity.isRemoved() && this.blockEntity.hasLevel()) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
index 018b24d7611c3fd11536441431abf8f125850129..ceea49a2b04d0493cfa8ad6629116e0c1a9c97b3 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
@@ -562,7 +562,7 @@ public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chun
}
}

- ChunkAccess.PackedTicks ichunkaccess_a = chunk.getTicksForSerialization(world.getGameTime());
+ ChunkAccess.PackedTicks ichunkaccess_a = chunk.getTicksForSerialization(world.getRedstoneGameTime()); // Folia - region threading
ShortList[] ashortlist = (ShortList[]) Arrays.stream(chunk.getPostProcessing()).map((shortlist) -> {
return shortlist != null ? new ShortArrayList(shortlist) : null;
}).toArray((k) -> {
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index b331c93c82c27f9456fec208a0c008c5bedfa8c4..e5513271a24711f46e9107cbe526d533afa54ca5 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
Expand Down

0 comments on commit 88f8af4

Please sign in to comment.