mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
21 lines
1.2 KiB
Diff
21 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 c1c57f24ccfa7bd17541f53d02293db0bce8dc5c..829c72333664da0c06ce04af93ea39bb90ce0b67 100644
|
|
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
@@ -656,8 +656,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));
|
|
}
|