Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
9147456fc9
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: ab8ace685 SPIGOT-7236: Bone meal doesn't increase use statistic 7dcb59b8e Avoid switch on material in previous commit Spigot Changes: 19641c75 SPIGOT-7235: World.Spigot#strikeLightningEffect doesn't do anything
32 Zeilen
1.8 KiB
Diff
32 Zeilen
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 f7b7a6a2327dd863390432679519caebac6dd567..9a3cc9af85b1f1d4d9ecb093f874f03d9bfde342 100644
|
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
@@ -369,6 +369,7 @@ public final class ItemStack {
|
|
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
|
|
world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710
|
|
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
|
|
index d4f5af759bbb6208432ad7b5002af5455dc7958c..a71414397bd45ee7bcacfeef0041d80dfa25f114 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
|
@@ -237,7 +237,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement
|
|
// CraftBukkit start
|
|
@Override
|
|
public boolean onlyOpCanSetNbt() {
|
|
- return true;
|
|
+ return false; // Paper
|
|
}
|
|
// CraftBukkit end
|
|
}
|