From aea9cdd37d87596177d874e7dcb778544be6cb79 Mon Sep 17 00:00:00 2001 From: Owen <23108066+Owen1212055@users.noreply.github.com> Date: Fri, 23 Jun 2023 12:03:43 -0400 Subject: [PATCH] Fix interact event call override (#9387) --- ...Correctly-handle-interactions-with-items-on-cooldown.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0879-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0879-Correctly-handle-interactions-with-items-on-cooldown.patch index e8591d026..c2c8040cc 100644 --- a/patches/server/0879-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0879-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -30,7 +30,7 @@ index 6a5e3649d9843d85eceb0eae225200fa2551e844..1635fee928d64f4d2c336dca6675ed46 this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactPosition = blockposition.immutable(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 9201e143ff520126c27a649bba62b359a01669c4..e813b58d724b9e5900df68f763ad0b59c84e47f4 100644 +index 9201e143ff520126c27a649bba62b359a01669c4..a4653a660e74f5d65489ddbb7b0e46134f2472c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -512,7 +512,13 @@ public class CraftEventFactory { @@ -40,7 +40,7 @@ index 9201e143ff520126c27a649bba62b359a01669c4..e813b58d724b9e5900df68f763ad0b59 + + // Paper start - cancelledItem param public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) { -+ return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, false, false, hand, null); ++ return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, cancelledBlock, false, hand, targetPos); + } + public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, boolean cancelledItem, InteractionHand hand, Vec3 targetPos) { + // Paper end - cancelledItem param