mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
8ab4559517
If a chunk had no entities or block entities, it would fail to load the PDC. This adds an additional check to see if there is PDC and then to load that if so. See: https://hub.spigotmc.org/jira/browse/SPIGOT-6814
22 lines
1.3 KiB
Diff
22 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
|
@@ -0,0 +0,0 @@ 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));
|
|
}
|