Fix incorrect old oversized chunk data merging

All legacy oversized chunks were created before the new
chunk format, so don't try to merge into the new format.
This commit is contained in:
Spottedleaf 2022-01-07 13:49:39 -08:00
parent c3d812d341
commit 5ccd3050ed
1 changed files with 3 additions and 3 deletions

View File

@ -142,7 +142,7 @@ index 04e45b4de2f4e26853a4fed6271cf79ef8607154..44de464b5f2190944c7a7316a76e13f9
private final ChunkPos pos; private final ChunkPos pos;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 40830a2b231df9bbf676d8325e76c8252a6c1d6c..2cbc17288b1dc52edb2bdad29976d0f551b1e176 100644 index 40830a2b231df9bbf676d8325e76c8252a6c1d6c..a1bfcdd713c47d8613eb4af7625a64d51161690b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -11,8 +11,10 @@ import java.nio.file.Files; @@ -11,8 +11,10 @@ import java.nio.file.Files;
@ -191,8 +191,8 @@ index 40830a2b231df9bbf676d8325e76c8252a6c1d6c..2cbc17288b1dc52edb2bdad29976d0f5
+ } + }
+ CompoundTag oversizedLevel = oversizedData.getCompound("Level"); + CompoundTag oversizedLevel = oversizedData.getCompound("Level");
+ +
+ mergeChunkList(chunk, oversizedLevel, "entities", "Entities"); + mergeChunkList(chunk.getCompound("Level"), oversizedLevel, "Entities", "Entities");
+ mergeChunkList(chunk, oversizedLevel, "block_entities", "TileEntities"); + mergeChunkList(chunk.getCompound("Level"), oversizedLevel, "TileEntities", "TileEntities");
+ +
+ return chunk; + return chunk;
+ } catch (Throwable throwable) { + } catch (Throwable throwable) {