blob: b3090adaf6d203fc8d4a070211f4bdb1c9eee175 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake <jake.m.potrebic@gmail.com>
Date: Sun, 28 Nov 2021 12:34:51 -0800
Subject: [PATCH] Load chunk PDC if present
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index e072a895ed71bb2e98a3a0c4aef37418c7c39f41..c7f9e155b14beab5b0ba1d4debddc9747f13675d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -687,8 +687,9 @@ public class ChunkSerializer {
private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel world, CompoundTag nbt) {
ListTag nbttaglist = ChunkSerializer.getListOfCompoundsOrNull(nbt, "entities");
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
+ boolean hasPdc = nbt.contains("ChunkBukkitValues", Tag.TAG_COMPOUND); // Paper
- return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
+ return nbttaglist == null && nbttaglist1 == null && !hasPdc ? null : (chunk) -> { // Paper
if (nbttaglist != null) {
world.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(nbttaglist, world));
}
|