mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Correctly parse last update for old chunks for regionfile recalc
It's required so that comparisons between two chunks can be made
This commit is contained in:
parent
2ecc06a8fb
commit
c885b21024
1 changed files with 7 additions and 1 deletions
|
@ -20,7 +20,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
+ // TODO: Check on update
|
||||
+ public static long getLastWorldSaveTime(CompoundTag chunkData) {
|
||||
+ return chunkData.getLong("LastUpdate");
|
||||
+ final int dataVersion = ChunkStorage.getVersion(chunkData);
|
||||
+ if (dataVersion < 2842) { // Level tag is removed after this version
|
||||
+ final CompoundTag levelData = chunkData.getCompound("Level");
|
||||
+ return levelData.getLong("LastUpdate");
|
||||
+ } else {
|
||||
+ return chunkData.getLong("LastUpdate");
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
|
|
Loading…
Reference in a new issue