PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockDispenser.patch

19 lines
890 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/level/block/BlockDispenser.java
+++ b/net/minecraft/world/level/block/BlockDispenser.java
@@ -46,6 +46,7 @@
object2objectopenhashmap.defaultReturnValue(new DispenseBehaviorItem());
});
private static final int TRIGGER_DURATION = 4;
+ public static boolean eventFired = false; // CraftBukkit
public static void registerBehavior(IMaterial imaterial, IDispenseBehavior idispensebehavior) {
BlockDispenser.DISPENSER_REGISTRY.put(imaterial.asItem(), idispensebehavior);
@@ -89,6 +90,7 @@
IDispenseBehavior idispensebehavior = this.getDispenseMethod(itemstack);
if (idispensebehavior != IDispenseBehavior.NOOP) {
+ eventFired = false; // CraftBukkit - reset event status
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
}