Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
35 Zeilen
1.6 KiB
Diff
35 Zeilen
1.6 KiB
Diff
From 1b80a8b0485c770ffc0e7a9a211d513b63d49755 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 33d9cac4d..d891e7b0e 100644
|
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
|
@@ -240,6 +240,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 c4766f729..b22bd06e2 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
|
@@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
|
// CraftBukkit start
|
|
@Override
|
|
public boolean isFilteredNBT() {
|
|
- return true;
|
|
+ return false; // Paper
|
|
}
|
|
// CraftBukkit end
|
|
}
|
|
--
|
|
2.24.1
|
|
|