Skip to content

Commit 94444ce

Browse files
Fix incorrect timestamp in region file header recalculation (#11318)
1 parent 5625051 commit 94444ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patches/server/1038-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ index a23dc2f8f4475de1ee35bf18a7a8a53233ccac12..226af44fd469053451a0403a95ffb446
7474
this.used.set(start, start + size);
7575
}
7676
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
77-
index e761b63eebc1e76b2bb1cb887d83d0b63ad6ec90..eb0389ad86300665b6e057bcfa1d7c068dc6c6ab 100644
77+
index e761b63eebc1e76b2bb1cb887d83d0b63ad6ec90..1e0439cf3f4008fa430acb90b45f5bc4cdd6d7f2 100644
7878
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
7979
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
8080
@@ -51,6 +51,354 @@ public class RegionFile implements AutoCloseable {
@@ -411,7 +411,7 @@ index e761b63eebc1e76b2bb1cb887d83d0b63ad6ec90..eb0389ad86300665b6e057bcfa1d7c06
411411
+ // simply destroy the timestamp header, it's not used
412412
+
413413
+ for (int i = 0; i < 32 * 32; ++i) {
414-
+ this.timestamps.put(i, calculatedOffsets[i] != 0 ? (int)System.currentTimeMillis() : 0); // write a valid timestamp for valid chunks, I do not want to find out whatever dumb program actually checks this
414+
+ this.timestamps.put(i, calculatedOffsets[i] != 0 ? RegionFile.getTimestamp() : 0); // write a valid timestamp for valid chunks, I do not want to find out whatever dumb program actually checks this
415415
+ }
416416
+
417417
+ // write new header

0 commit comments

Comments
 (0)