geforkt von Mirrors/Paper
275173e538
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 Bukkit Changes: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
21 Zeilen
1.2 KiB
Diff
21 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Fri, 13 Aug 2021 15:00:06 -0700
|
|
Subject: [PATCH] Clear bucket NBT after dispense
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
index cec6ee5d31f2a86a61fd142035af853fa512e211..f651d866355557d10d4bb8730e0aceac483d3ba7 100644
|
|
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
@@ -650,8 +650,7 @@ public interface DispenseItemBehavior {
|
|
Item item = Items.BUCKET;
|
|
stack.shrink(1);
|
|
if (stack.isEmpty()) {
|
|
- stack.setItem(Items.BUCKET);
|
|
- stack.setCount(1);
|
|
+ stack = new ItemStack(item); // Paper - clear tag
|
|
} else if (((DispenserBlockEntity) pointer.getEntity()).addItem(new ItemStack(item)) < 0) {
|
|
this.defaultDispenseItemBehavior.dispense(pointer, new ItemStack(item));
|
|
}
|