--- a/net/minecraft/world/level/block/BlockDispenser.java +++ b/net/minecraft/world/level/block/BlockDispenser.java @@ -41,10 +41,11 @@ public static final BlockStateDirection FACING = BlockDirectional.FACING; public static final BlockStateBoolean TRIGGERED = BlockProperties.TRIGGERED; - public static final Map DISPENSER_REGISTRY = (Map) SystemUtils.a((Object) (new Object2ObjectOpenHashMap()), (object2objectopenhashmap) -> { + public static final Map DISPENSER_REGISTRY = (Map) SystemUtils.a((new Object2ObjectOpenHashMap()), (object2objectopenhashmap) -> { // CraftBukkit - decompile error object2objectopenhashmap.defaultReturnValue(new DispenseBehaviorItem()); }); private static final int TRIGGER_DURATION = 4; + public static boolean eventFired = false; // CraftBukkit public static void a(IMaterial imaterial, IDispenseBehavior idispensebehavior) { BlockDispenser.DISPENSER_REGISTRY.put(imaterial.getItem(), idispensebehavior); @@ -88,6 +89,7 @@ IDispenseBehavior idispensebehavior = this.a(itemstack); if (idispensebehavior != IDispenseBehavior.NOOP) { + eventFired = false; // CraftBukkit - reset event status tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack)); }