summaryrefslogtreecommitdiffhomepage
path: root/patches/server/0246-Allow-chests-to-be-placed-with-NBT-data.patch
diff options
context:
space:
mode:
authorRiley Park <[email protected]>2024-05-15 17:06:59 -0700
committerGitHub <[email protected]>2024-05-15 17:06:59 -0700
commitf17519338bc589c045e0b32bfc37e048b23544d5 (patch)
treee50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0246-Allow-chests-to-be-placed-with-NBT-data.patch
parent3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff)
downloadPaper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz
Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip
Expose server build information (#10729)
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <[email protected]> Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0246-Allow-chests-to-be-placed-with-NBT-data.patch')
-rw-r--r--patches/server/0246-Allow-chests-to-be-placed-with-NBT-data.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/server/0246-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0246-Allow-chests-to-be-placed-with-NBT-data.patch
new file mode 100644
index 0000000000..1a3e71696c
--- /dev/null
+++ b/patches/server/0246-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 6dd441484dbae1818a927773a6e6c663c70ccd0e..91f342912372326a6ced16c23550da7727d6d3ad 100644
+--- a/src/main/java/net/minecraft/world/item/ItemStack.java
++++ b/src/main/java/net/minecraft/world/item/ItemStack.java
+@@ -469,6 +469,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 9d6262e286a00f840d88d6eb6bfdb304467466e3..b88aa184cd06a0485146f58a5b61a56a50911209 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
+ }