2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/block/BlockDispenser.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockDispenser.java
|
2023-06-07 17:30:00 +02:00
|
|
|
@@ -46,6 +46,7 @@
|
2018-08-26 04:00:00 +02:00
|
|
|
object2objectopenhashmap.defaultReturnValue(new DispenseBehaviorItem());
|
|
|
|
});
|
2021-06-11 07:00:00 +02:00
|
|
|
private static final int TRIGGER_DURATION = 4;
|
2014-11-25 22:32:16 +01:00
|
|
|
+ public static boolean eventFired = false; // CraftBukkit
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
public static void registerBehavior(IMaterial imaterial, IDispenseBehavior idispensebehavior) {
|
|
|
|
BlockDispenser.DISPENSER_REGISTRY.put(imaterial.asItem(), idispensebehavior);
|
2023-06-07 17:30:00 +02:00
|
|
|
@@ -89,6 +90,7 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
IDispenseBehavior idispensebehavior = this.getDispenseMethod(itemstack);
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
if (idispensebehavior != IDispenseBehavior.NOOP) {
|
2018-07-15 02:00:00 +02:00
|
|
|
+ eventFired = false; // CraftBukkit - reset event status
|
|
|
|
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
|
|
|
}
|
2016-11-17 02:41:03 +01:00
|
|
|
|