From c755f909339554e2c945e7aa62ab55f660e02031 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 9 Sep 2018 11:53:23 -0500 Subject: [PATCH] Allow chests to be placed with NBT (#1425) This restores vanilla behavior of allowing placed chests to retain any Block Entity Tag data. Upstream added filtering to chests, breaking vanilla behavior, and preventing use of loot table chests as a reward mechanism. Upon review, we can find no security risk in allowing players to place a chest with NBT data, as Spawn Eggs, Minecarts, command blocks etc all have their own checks. Additionally, survival mode players, non op players can not create these items anyways. If a player has Creative or Op, they already have high levels of access. Plus, Chests aren't the only inventory that could have free form items, so this filter was insufficient anyways. --- ...ow-chests-to-be-placed-with-NBT-data.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Spigot-Server-Patches/0364-Allow-chests-to-be-placed-with-NBT-data.patch diff --git a/Spigot-Server-Patches/0364-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0364-Allow-chests-to-be-placed-with-NBT-data.patch new file mode 100644 index 0000000000..359cfc1d8b --- /dev/null +++ b/Spigot-Server-Patches/0364-Allow-chests-to-be-placed-with-NBT-data.patch @@ -0,0 +1,22 @@ +From 2778cdcac727ba60b80f7a3222f863e7bdb8dfc9 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 8 Sep 2018 18:43:31 -0500 +Subject: [PATCH] Allow chests to be placed with NBT data + + +diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java +index 9573a4ecd..7594c16e9 100644 +--- a/src/main/java/net/minecraft/server/TileEntityChest.java ++++ b/src/main/java/net/minecraft/server/TileEntityChest.java +@@ -305,7 +305,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic + // CraftBukkit start + @Override + public boolean isFilteredNBT() { +- return true; ++ return false; // Paper + } + // CraftBukkit end + } +-- +2.18.0 +