Paper/nms-patches/BlockDispenser.patch

19 lines
867 B
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/BlockDispenser.java
+++ b/net/minecraft/server/BlockDispenser.java
2016-05-10 13:47:39 +02:00
@@ -9,6 +9,7 @@
public static final BlockStateBoolean TRIGGERED = BlockStateBoolean.of("triggered");
2015-07-30 08:56:52 +02:00
public static final RegistryDefault<Item, IDispenseBehavior> REGISTRY = new RegistryDefault(new DispenseBehaviorItem());
2016-02-29 22:32:46 +01:00
protected Random d = new Random();
+ public static boolean eventFired = false; // CraftBukkit
protected BlockDispenser() {
super(Material.STONE);
2016-05-10 13:47:39 +02:00
@@ -84,6 +85,7 @@
2015-07-30 08:56:52 +02:00
if (idispensebehavior != IDispenseBehavior.NONE) {
ItemStack itemstack1 = idispensebehavior.a(sourceblock, itemstack);
+ eventFired = false; // CraftBukkit - reset event status
2015-05-05 22:43:47 +02:00
tileentitydispenser.setItem(i, itemstack1.count <= 0 ? null : itemstack1);
}