diff options
author | Newwind <[email protected]> | 2024-08-25 18:42:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-25 19:42:15 +0200 |
commit | 94444cebc3e5e109e139df4f9a614f14c54d9cef (patch) | |
tree | c679261b848361281d8f1d3ce984abf36f509d94 | |
parent | 5625051564924fb7be42408b4de7e1f030eca34d (diff) | |
download | Paper-94444cebc3e5e109e139df4f9a614f14c54d9cef.tar.gz Paper-94444cebc3e5e109e139df4f9a614f14c54d9cef.zip |
Fix incorrect timestamp in region file header recalculation (#11318)
-rw-r--r-- | patches/server/1038-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/1038-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/1038-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch index 3b391d165a..114443675b 100644 --- a/patches/server/1038-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch +++ b/patches/server/1038-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch @@ -74,7 +74,7 @@ index a23dc2f8f4475de1ee35bf18a7a8a53233ccac12..226af44fd469053451a0403a95ffb446 this.used.set(start, start + size); } 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 -index e761b63eebc1e76b2bb1cb887d83d0b63ad6ec90..eb0389ad86300665b6e057bcfa1d7c068dc6c6ab 100644 +index e761b63eebc1e76b2bb1cb887d83d0b63ad6ec90..1e0439cf3f4008fa430acb90b45f5bc4cdd6d7f2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -51,6 +51,354 @@ public class RegionFile implements AutoCloseable { @@ -411,7 +411,7 @@ index e761b63eebc1e76b2bb1cb887d83d0b63ad6ec90..eb0389ad86300665b6e057bcfa1d7c06 + // simply destroy the timestamp header, it's not used + + for (int i = 0; i < 32 * 32; ++i) { -+ 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 ++ 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 + } + + // write new header |