2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockDispenser.java
|
|
|
|
+++ b/net/minecraft/server/BlockDispenser.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -7,6 +7,7 @@
|
|
|
|
public static final BlockStateDirection FACING = BlockDirectional.FACING;
|
|
|
|
public static final BlockStateBoolean TRIGGERED = BlockProperties.w;
|
2015-07-30 08:56:52 +02:00
|
|
|
public static final RegistryDefault<Item, IDispenseBehavior> REGISTRY = new RegistryDefault(new DispenseBehaviorItem());
|
2014-11-25 22:32:16 +01:00
|
|
|
+ public static boolean eventFired = false; // CraftBukkit
|
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
public static void a(IMaterial imaterial, IDispenseBehavior idispensebehavior) {
|
|
|
|
BlockDispenser.REGISTRY.a(imaterial.getItem(), idispensebehavior);
|
|
|
|
@@ -52,6 +53,7 @@
|
|
|
|
IDispenseBehavior idispensebehavior = this.a(itemstack);
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
if (idispensebehavior != IDispenseBehavior.NONE) {
|
|
|
|
+ eventFired = false; // CraftBukkit - reset event status
|
|
|
|
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
|
|
|
}
|
2016-11-17 02:41:03 +01:00
|
|
|
|