mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-06 19:00:16 +01:00
32 lines
1.8 KiB
Diff
32 lines
1.8 KiB
Diff
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
|
|
index 24db5dedf8b41b26fa990a7c7317cdb3e89e7fcd..852f9d99001b35f8c97f4445d8f605533d7f6f2f 100644
|
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
@@ -298,6 +298,7 @@ public final class ItemStack {
|
|
enuminteractionresult = EnumInteractionResult.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
|
|
for (BlockState blockstate : blocks) {
|
|
blockstate.update(true, false);
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
|
index 51167d776c710decb0107bebcb35bdf43103772b..111f62d0e5b40e945793b8f504f2c035c0884a6a 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
|
@@ -327,7 +327,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
|
// CraftBukkit start
|
|
@Override
|
|
public boolean isFilteredNBT() {
|
|
- return true;
|
|
+ return false; // Paper
|
|
}
|
|
// CraftBukkit end
|
|
}
|