Paper/patches/server/0745-Clear-bucket-NBT-after-dispense.patch
Shane Freeder aa52bf9e33
Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)
Mojang made some changes to priorities in 1.17 and it seems that these changes
conflict with the changes made in this patch, which in some cases appears to
cause excessive rescheduling of tasks.

This, however, is not confirmed as such but seems to be the behavior that we're
seeing to cause this issue, if mojang has adopted the changes we suggested,
then a good chunk of this patch may be unneeded, but, this needs a much better
look than I'm currently able to do
2021-08-14 14:55:55 +01:00

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 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));
}