Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
32 Zeilen
1.7 KiB
Diff
32 Zeilen
1.7 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/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
|
index 22568201a292edc8e25396e55cad1572d419b775..7ad595d5d7e090c523aa45a10d0f84b609ea86df 100644
|
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
|
@@ -244,6 +244,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/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
|
index 52f64460ba1bfb298f343f71a923c8f34de9e39d..d429c6a4154497fea813ef98d1a30eef2ca5e5e0 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
|
@@ -300,7 +300,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
|
// CraftBukkit start
|
|
@Override
|
|
public boolean isFilteredNBT() {
|
|
- return true;
|
|
+ return false; // Paper
|
|
}
|
|
// CraftBukkit end
|
|
}
|