mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Clear bucket NBT after dispense (#6391)
This commit is contained in:
parent
112c19b45e
commit
b230147e18
1 changed files with 20 additions and 0 deletions
20
patches/server/Clear-bucket-NBT-after-dispense.patch
Normal file
20
patches/server/Clear-bucket-NBT-after-dispense.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -0,0 +0,0 @@ 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));
|
||||
}
|
Loading…
Reference in a new issue