2021-08-14 11:51:03 +02:00
|
|
|
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
|
2024-01-19 13:22:30 +01:00
|
|
|
index 8c8d2e81f0866dc1441e181f2580852d87263bcc..d41e3e5382b17d3de41054b496c1707a926a897a 100644
|
2021-08-14 11:51:03 +02:00
|
|
|
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
|
|
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
2023-06-08 04:04:01 +02:00
|
|
|
@@ -650,8 +650,7 @@ public interface DispenseItemBehavior {
|
2021-08-14 11:51:03 +02:00
|
|
|
Item item = Items.BUCKET;
|
|
|
|
stack.shrink(1);
|
|
|
|
if (stack.isEmpty()) {
|
|
|
|
- stack.setItem(Items.BUCKET);
|
|
|
|
- stack.setCount(1);
|
2024-01-19 13:22:30 +01:00
|
|
|
+ stack = new ItemStack(item); // Paper - Clear bucket NBT after dispense
|
2023-09-22 14:22:24 +02:00
|
|
|
} else if (pointer.blockEntity().addItem(new ItemStack(item)) < 0) {
|
2021-08-14 11:51:03 +02:00
|
|
|
this.defaultDispenseItemBehavior.dispense(pointer, new ItemStack(item));
|
|
|
|
}
|