aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DispenserBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DispenserBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DispenserBlock.java.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DispenserBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DispenserBlock.java.patch
new file mode 100644
index 0000000000..1386fa28c8
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DispenserBlock.java.patch
@@ -0,0 +1,22 @@
+--- a/net/minecraft/world/level/block/DispenserBlock.java
++++ b/net/minecraft/world/level/block/DispenserBlock.java
+@@ -49,6 +49,7 @@
+ object2objectopenhashmap.defaultReturnValue(new DefaultDispenseItemBehavior());
+ });
+ private static final int TRIGGER_DURATION = 4;
++ public static boolean eventFired = false; // CraftBukkit
+
+ @Override
+ @Override
+@@ -102,8 +101,9 @@
+ ItemStack itemstack = dispenserblockentity.getItem(i);
+ DispenseItemBehavior dispenseitembehavior = this.getDispenseMethod(itemstack);
+
+- if (dispenseitembehavior != DispenseItemBehavior.NOOP) {
+- dispenserblockentity.setItem(i, dispenseitembehavior.dispense(blocksource, itemstack));
++ if (idispensebehavior != DispenseItemBehavior.NOOP) {
++ eventFired = false; // CraftBukkit - reset event status
++ tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
+ }
+
+ }