PaperMC/patches/server/0110-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch

20 lines
1.1 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 12 Nov 2016 23:25:22 -0600
Subject: [PATCH] Filter bad tile entity nbt data from falling blocks
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
2023-06-08 00:28:06 +02:00
index 26ef917d401eb79466e246d82b5d689c7133c7a2..95bcd8f03a784287c5a6106c784448e54c4b531b 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
2023-03-14 19:36:39 +01:00
@@ -332,7 +332,7 @@ public class FallingBlockEntity extends Entity {
this.dropItem = nbt.getBoolean("DropItem");
}
- if (nbt.contains("TileEntityData", 10)) {
2023-06-08 00:28:06 +02:00
+ if (nbt.contains("TileEntityData", 10) && !(this.level().paperConfig().entities.spawning.filterBadTileEntityNbtFromFallingBlocks && this.blockState.getBlock() instanceof net.minecraft.world.level.block.GameMasterBlock)) {
this.blockData = nbt.getCompound("TileEntityData");
}