From 1cfe56c8424c4e6a060fadd4d3f66479fcbf0ac4 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 29 Sep 2018 20:57:59 -0500 Subject: [PATCH] Fix cancelled lootables (#1510) --- ...ow-chests-to-be-placed-with-NBT-data.patch | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch index 7507f356a9..d212c94b8d 100644 --- a/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch @@ -4,8 +4,28 @@ 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/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java +index 4641113f9..26055924b 100644 +--- a/src/main/java/net/minecraft/server/ItemStack.java ++++ b/src/main/java/net/minecraft/server/ItemStack.java +@@ -0,0 +0,0 @@ public final class ItemStack { + enuminteractionresult = EnumInteractionResult.FAIL; // cancel placement + // PAIL: Remove this when MC-99075 fixed + placeEvent.getPlayer().updateInventory(); ++ ++ // Paper start ++ for (Map.Entry e : world.capturedTileEntities.entrySet()) { ++ if (e.getValue() instanceof TileEntityLootable) { ++ ((TileEntityLootable) e.getValue()).setLootTable(null); ++ } ++ } ++ // Paper end ++ + // revert back all captured blocks + for (BlockState blockstate : blocks) { + blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 9573a4ecdf..7594c16e99 100644 +index 9573a4ecd..7594c16e9 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic