2021-06-11 14:02:28 +02: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-12-06 21:28:36 +01:00
|
|
|
index de3a7542403e0b42679ac7fab623611605f280b7..e546f212d0228171920a0b28f918020617dfd7ca 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
2021-12-06 21:28:36 +01:00
|
|
|
@@ -339,6 +339,7 @@ public final class ItemStack {
|
2021-06-11 14:02:28 +02: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 08:52:40 +02:00
|
|
|
world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710
|
2021-06-11 14:02:28 +02: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-11-24 00:06:05 +01:00
|
|
|
index ff8e05038c1c2fa630f2d4efe460a313d209da8d..e56f7d76b501dab7d549efd2fafd514a9625c24e 100644
|
2021-06-11 14:02:28 +02: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-11-24 00:06:05 +01:00
|
|
|
@@ -238,7 +238,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement
|
2021-06-11 14:02:28 +02:00
|
|
|
// CraftBukkit start
|
|
|
|
@Override
|
|
|
|
public boolean onlyOpCanSetNbt() {
|
|
|
|
- return true;
|
|
|
|
+ return false; // Paper
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|