3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-17 20:10:10 +01:00
Paper/nms-patches/BlockDispenser.patch
2018-07-15 10:00:00 +10:00

19 Zeilen
960 B
Diff

--- a/net/minecraft/server/BlockDispenser.java
+++ b/net/minecraft/server/BlockDispenser.java
@@ -7,6 +7,7 @@
public static final BlockStateDirection FACING = BlockDirectional.FACING;
public static final BlockStateBoolean TRIGGERED = BlockProperties.w;
public static final RegistryDefault<Item, IDispenseBehavior> REGISTRY = new RegistryDefault(new DispenseBehaviorItem());
+ public static boolean eventFired = false; // CraftBukkit
public static void a(IMaterial imaterial, IDispenseBehavior idispensebehavior) {
BlockDispenser.REGISTRY.a(imaterial.getItem(), idispensebehavior);
@@ -52,6 +53,7 @@
IDispenseBehavior idispensebehavior = this.a(itemstack);
if (idispensebehavior != IDispenseBehavior.NONE) {
+ eventFired = false; // CraftBukkit - reset event status
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
}