aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/BlockDispenser.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockDispenser.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/level/block/BlockDispenser.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockDispenser.patch b/patch-remap/og/net/minecraft/world/level/block/BlockDispenser.patch
new file mode 100644
index 0000000000..36f91ac5b5
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/level/block/BlockDispenser.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/world/level/block/BlockDispenser.java
++++ b/net/minecraft/world/level/block/BlockDispenser.java
+@@ -49,6 +49,7 @@
+ object2objectopenhashmap.defaultReturnValue(new DispenseBehaviorItem());
+ });
+ private static final int TRIGGER_DURATION = 4;
++ public static boolean eventFired = false; // CraftBukkit
+
+ @Override
+ public MapCodec<? extends BlockDispenser> codec() {
+@@ -85,7 +86,7 @@
+ }
+
+ public void dispenseFrom(WorldServer worldserver, IBlockData iblockdata, BlockPosition blockposition) {
+- TileEntityDispenser tileentitydispenser = (TileEntityDispenser) worldserver.getBlockEntity(blockposition, TileEntityTypes.DISPENSER).orElse((Object) null);
++ TileEntityDispenser tileentitydispenser = (TileEntityDispenser) worldserver.getBlockEntity(blockposition, TileEntityTypes.DISPENSER).orElse(null); // CraftBukkit - decompile error
+
+ if (tileentitydispenser == null) {
+ BlockDispenser.LOGGER.warn("Ignoring dispensing attempt for Dispenser without matching block entity at {}", blockposition);
+@@ -101,6 +102,7 @@
+ IDispenseBehavior idispensebehavior = this.getDispenseMethod(itemstack);
+
+ if (idispensebehavior != IDispenseBehavior.NOOP) {
++ eventFired = false; // CraftBukkit - reset event status
+ tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
+ }
+