2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
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
|
2021-10-17 16:57:00 +00:00
|
|
|
index 533f2fd1a7c63180385ef544cba2b1d29c00b481..c5683f76f6f11246dc5bbaa13dfc253e5e286590 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
2021-10-17 16:57:00 +00:00
|
|
|
@@ -338,6 +338,7 @@ public final class ItemStack {
|
2021-06-11 12:02:28 +00:00
|
|
|
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
|
2021-07-07 06:52:40 +00:00
|
|
|
world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710
|
2021-06-11 12:02:28 +00:00
|
|
|
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
|
2021-06-13 04:03:02 +00:00
|
|
|
index f2c9755c2b55bee2a0b981313e1fcd1f8ab5e3d8..52de9852f87d346714a950b60a0004d386ac10f0 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
2021-06-13 04:03:02 +00:00
|
|
|
@@ -239,7 +239,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement
|
2021-06-11 12:02:28 +00:00
|
|
|
// CraftBukkit start
|
|
|
|
@Override
|
|
|
|
public boolean onlyOpCanSetNbt() {
|
|
|
|
- return true;
|
|
|
|
+ return false; // Paper
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|