summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockDispenser.patch
blob: 3292d90aea29d8d28c9a0401772126c403f53fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/net/minecraft/server/BlockDispenser.java
+++ b/net/minecraft/server/BlockDispenser.java
@@ -9,9 +9,10 @@
 
     public static final BlockStateDirection FACING = BlockDirectional.FACING;
     public static final BlockStateBoolean TRIGGERED = BlockProperties.w;
-    public static final Map<Item, IDispenseBehavior> REGISTRY = (Map) SystemUtils.a((Object) (new Object2ObjectOpenHashMap()), (object2objectopenhashmap) -> {
+    public static final Map<Item, IDispenseBehavior> REGISTRY = (Map) SystemUtils.a((new Object2ObjectOpenHashMap()), (object2objectopenhashmap) -> { // CraftBukkit - decompile error
         object2objectopenhashmap.defaultReturnValue(new DispenseBehaviorItem());
     });
+    public static boolean eventFired = false; // CraftBukkit
 
     public static void a(IMaterial imaterial, IDispenseBehavior idispensebehavior) {
         BlockDispenser.REGISTRY.put(imaterial.getItem(), idispensebehavior);
@@ -57,6 +58,7 @@
             IDispenseBehavior idispensebehavior = this.a(itemstack);
 
             if (idispensebehavior != IDispenseBehavior.NONE) {
+                eventFired = false; // CraftBukkit - reset event status
                 tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
             }