2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockDispenser.java
|
|
|
|
+++ b/net/minecraft/server/BlockDispenser.java
|
2014-11-25 22:32:16 +01:00
|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
public static final BlockStateBoolean TRIGGERED = BlockStateBoolean.of("triggered");
|
2015-02-26 23:41:06 +01:00
|
|
|
public static final RegistryDefault<Item, IDispenseBehavior> N = new RegistryDefault(new DispenseBehaviorItem());
|
|
|
|
protected Random O = new Random();
|
2014-11-25 22:32:16 +01:00
|
|
|
+ public static boolean eventFired = false; // CraftBukkit
|
|
|
|
|
|
|
|
protected BlockDispenser() {
|
|
|
|
super(Material.STONE);
|
2015-02-26 23:41:06 +01:00
|
|
|
@@ -68,7 +69,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- protected void dispense(World world, BlockPosition blockposition) {
|
|
|
|
+ public void dispense(World world, BlockPosition blockposition) { // CraftBukkit - public
|
|
|
|
SourceBlock sourceblock = new SourceBlock(world, blockposition);
|
|
|
|
TileEntityDispenser tileentitydispenser = (TileEntityDispenser) sourceblock.getTileEntity();
|
|
|
|
|
|
|
|
@@ -83,6 +84,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
if (idispensebehavior != IDispenseBehavior.a) {
|
|
|
|
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);
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|