From 8a6e9e51f3ad8e7f1532e61189e58ac24b07ce50 Mon Sep 17 00:00:00 2001
From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com>
Date: Sat, 29 Jun 2024 10:51:29 +0200
Subject: [PATCH] fix: Fix UseItemInputEvent cancellation being applied on next
 use only https://github.com/TwelveIterationMods/ClientTweaks/issues/85

---
 .../main/java/net/blay09/mods/balm/mixin/MinecraftMixin.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fabric/src/main/java/net/blay09/mods/balm/mixin/MinecraftMixin.java b/fabric/src/main/java/net/blay09/mods/balm/mixin/MinecraftMixin.java
index 06acfc24..ec8cc3bf 100644
--- a/fabric/src/main/java/net/blay09/mods/balm/mixin/MinecraftMixin.java
+++ b/fabric/src/main/java/net/blay09/mods/balm/mixin/MinecraftMixin.java
@@ -33,7 +33,7 @@ public Screen modifyScreen(Screen screen) {
         return event.getNewScreen() != null ? event.getNewScreen() : screen;
     }
 
-    @Inject(method = "startUseItem()V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;getItemInHand(Lnet/minecraft/world/InteractionHand;)Lnet/minecraft/world/item/ItemStack;"), cancellable = true)
+    @Inject(method = "startUseItem()V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;getItemInHand(Lnet/minecraft/world/InteractionHand;)Lnet/minecraft/world/item/ItemStack;", shift = At.Shift.AFTER), cancellable = true)
     public void startUseItem(CallbackInfo callbackInfo) {
         final var event = balmCurrentUseEvent.get();
         if (event != null && event.isCanceled()) {