diff options
author | Nassim Jahnke <[email protected]> | 2024-12-03 17:58:41 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-03 17:58:41 +0100 |
commit | c0a3d51ab35930e410fcd9752ceaff6c3f581c24 (patch) | |
tree | f53076a8b0787d2f544f73f468df94619e5eb1a5 /patches/unapplied/server/0241-Allow-chests-to-be-placed-with-NBT-data.patch | |
parent | da7138233f6392e791d790d1c3407414c855f9c2 (diff) | |
download | Paper-c0a3d51ab35930e410fcd9752ceaff6c3f581c24.tar.gz Paper-c0a3d51ab35930e410fcd9752ceaff6c3f581c24.zip |
Start update, apply API patches
Diffstat (limited to 'patches/unapplied/server/0241-Allow-chests-to-be-placed-with-NBT-data.patch')
-rw-r--r-- | patches/unapplied/server/0241-Allow-chests-to-be-placed-with-NBT-data.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/unapplied/server/0241-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/unapplied/server/0241-Allow-chests-to-be-placed-with-NBT-data.patch new file mode 100644 index 0000000000..4b282589d9 --- /dev/null +++ b/patches/unapplied/server/0241-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 957c112b4145fda5078a6f8f1689935fa0290806..f00b756fe5dad616323e3b11e35e27353f347042 100644 +--- a/src/main/java/net/minecraft/world/item/ItemStack.java ++++ b/src/main/java/net/minecraft/world/item/ItemStack.java +@@ -496,6 +496,7 @@ public final class ItemStack implements DataComponentHolder { + enuminteractionresult = InteractionResult.FAIL; // cancel placement + // PAIL: Remove this when MC-99075 fixed + placeEvent.getPlayer().updateInventory(); ++ world.capturedTileEntities.clear(); // Paper - Allow chests to be placed with NBT data; clear out block 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 a3cdb4af2b7a3c7f884c8af2cba0d3d5e1c184a6..8847617f6a23e6d2fe9bf7444a2072dc53f741b8 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 +@@ -238,7 +238,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement + // CraftBukkit start + @Override + public boolean onlyOpCanSetNbt() { +- return true; ++ return false; // Paper - Allow chests to be placed with NBT data + } + // CraftBukkit end + } |