aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch')
-rw-r--r--patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
index c7fd071747..b2a5f27dd2 100644
--- a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
+++ b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
@@ -13,18 +13,18 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index d20f71a2098b327423cbdbbc096aa9e358cb809d..7147484eefad44ba67db03b6ef2090a596e278de 100644
+index d6ad310d3b472c40c128cfb459171d9f48e50915..48bee70ba4188a4a55beb6584224b0f23784dd88 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -58,6 +58,7 @@ public abstract class BlockEntity {
- this.type = type;
+@@ -59,6 +59,7 @@ public abstract class BlockEntity {
this.worldPosition = pos.immutable();
+ this.validateBlockState(state);
this.blockState = state;
+ this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); // Paper - always init
}
- public static BlockPos getPosFromTag(CompoundTag nbt) {
-@@ -79,7 +80,7 @@ public abstract class BlockEntity {
+ private void validateBlockState(BlockState state) {
+@@ -92,7 +93,7 @@ public abstract class BlockEntity {
// CraftBukkit start - read container
protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) {
@@ -33,7 +33,7 @@ index d20f71a2098b327423cbdbbc096aa9e358cb809d..7147484eefad44ba67db03b6ef2090a5
net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues");
if (persistentDataTag instanceof CompoundTag) {
-@@ -363,8 +364,15 @@ public abstract class BlockEntity {
+@@ -379,8 +380,15 @@ public abstract class BlockEntity {
// CraftBukkit start - add method
public InventoryHolder getOwner() {