diff options
Diffstat (limited to 'patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch')
-rw-r--r-- | patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch new file mode 100644 index 0000000000..a261a829fa --- /dev/null +++ b/patches/server/0251-Allow-chests-to-be-placed-with-NBT-data.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath <[email protected]> +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/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java +index 8e8bcf829818fbbaedb13d9eddca096d457c511a..19e8d10727fc4838cd8261dfec92f3828ea5b09f 100644 +--- a/src/main/java/net/minecraft/world/item/ItemStack.java ++++ b/src/main/java/net/minecraft/world/item/ItemStack.java +@@ -407,6 +407,7 @@ public final class ItemStack { + enuminteractionresult = InteractionResult.FAIL; // cancel placement + // PAIL: Remove this when MC-99075 fixed + placeEvent.getPlayer().updateInventory(); ++ world.capturedTileEntities.clear(); // Paper - clear out tile entities as chests and such will pop loot + // revert back all captured blocks + world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710 + for (BlockState blockstate : blocks) { +diff --git a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java +index d4f5af759bbb6208432ad7b5002af5455dc7958c..a71414397bd45ee7bcacfeef0041d80dfa25f114 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java +@@ -237,7 +237,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement + // CraftBukkit start + @Override + public boolean onlyOpCanSetNbt() { +- return true; ++ return false; // Paper + } + // CraftBukkit end + } |