PaperMC/patches/server/0591-Clear-bucket-NBT-after-dispense.patch
Riley Park f17519338b
Expose server build information (#10729)
* Expose server build information

* squash patches

* final tweaks

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2024-05-15 17:06:59 -07:00

20 lines
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 dc68ade2ed576020a4a40608243059d6d9d82f19..f880f9faa1e5660853f28c0e2daf4ab6bc6a55fd 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -444,8 +444,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 bucket NBT after dispense
} else if (pointer.blockEntity().addItem(new ItemStack(item)) < 0) {
this.defaultDispenseItemBehavior.dispense(pointer, new ItemStack(item));
}