mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
25f3b50f6b
By: md_5 <git@md-5.net>
18 lines
890 B
Diff
18 lines
890 B
Diff
--- a/net/minecraft/world/level/block/BlockDispenser.java
|
|
+++ b/net/minecraft/world/level/block/BlockDispenser.java
|
|
@@ -47,6 +47,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);
|
|
@@ -90,6 +91,7 @@
|
|
IDispenseBehavior idispensebehavior = this.getDispenseMethod(itemstack);
|
|
|
|
if (idispensebehavior != IDispenseBehavior.NOOP) {
|
|
+ eventFired = false; // CraftBukkit - reset event status
|
|
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
|
}
|
|
|