Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +01:00
23 Zeilen
1.2 KiB
Diff
23 Zeilen
1.2 KiB
Diff
--- a/net/minecraft/server/BlockDispenser.java
|
|
+++ b/net/minecraft/server/BlockDispenser.java
|
|
@@ -8,9 +8,10 @@
|
|
|
|
public static final BlockStateDirection FACING = BlockDirectional.FACING;
|
|
public static final BlockStateBoolean TRIGGERED = BlockProperties.A;
|
|
- public static final Map<Item, IDispenseBehavior> REGISTRY = (Map) SystemUtils.a((Object) (new Object2ObjectOpenHashMap()), (object2objectopenhashmap) -> {
|
|
+ public static final Map<Item, IDispenseBehavior> REGISTRY = (Map) SystemUtils.a((new Object2ObjectOpenHashMap()), (object2objectopenhashmap) -> { // CraftBukkit - decompile error
|
|
object2objectopenhashmap.defaultReturnValue(new DispenseBehaviorItem());
|
|
});
|
|
+ public static boolean eventFired = false; // CraftBukkit
|
|
|
|
public static void a(IMaterial imaterial, IDispenseBehavior idispensebehavior) {
|
|
BlockDispenser.REGISTRY.put(imaterial.getItem(), idispensebehavior);
|
|
@@ -53,6 +54,7 @@
|
|
IDispenseBehavior idispensebehavior = this.a(itemstack);
|
|
|
|
if (idispensebehavior != IDispenseBehavior.NONE) {
|
|
+ eventFired = false; // CraftBukkit - reset event status
|
|
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
|
}
|
|
|