mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
Clear bucket NBT after dispense (#6391)
This commit is contained in:
parent
c2f47a76ae
commit
f12a7f57e1
1 changed files with 20 additions and 0 deletions
20
patches/server/0747-Clear-bucket-NBT-after-dispense.patch
Normal file
20
patches/server/0747-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 92623ae25249d63efb92be8bd6c95228f9155ad2..0d34026a70c72661a9ba6b319690370e589714cc 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -555,8 +555,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));
|
||||
}
|
Loading…
Reference in a new issue