From ac9ba6d2c9d8dc1bfb839ed54e7dca47246d0f8d Mon Sep 17 00:00:00 2001 From: Kam Date: Fri, 13 Mar 2026 04:49:56 -0400 Subject: [PATCH] Fix Swing and Use Animation --- .../npcgecko/item/ItemCustomModelPredicate.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/goodbird/npcgecko/item/ItemCustomModelPredicate.java b/src/main/java/com/goodbird/npcgecko/item/ItemCustomModelPredicate.java index 1e89f4c..ca48796 100644 --- a/src/main/java/com/goodbird/npcgecko/item/ItemCustomModelPredicate.java +++ b/src/main/java/com/goodbird/npcgecko/item/ItemCustomModelPredicate.java @@ -83,7 +83,14 @@ public class ItemCustomModelPredicate { if (swingActive) { if (controller.getAnimationState() == AnimationState.Stopped) { fpSwingActive.put(animId, false); - // Fall through to use/idle + // Swing just finished — if player is already using, blend directly + // from swing end pose into use (skip idle entirely) + if (localPlayer.isUsingItem() && useAnim != null && !useAnim.isEmpty()) { + controller.markNeedsReload(); + controller.setAnimation(new AnimationBuilder().loop(useAnim)); + return PlayState.CONTINUE; + } + // Otherwise fall through to use/idle checks below } else { // Swing still playing, no new click — suppress vanilla swing localPlayer.isSwingInProgress = false; @@ -124,7 +131,7 @@ public class ItemCustomModelPredicate { if (controller.getAnimationState() != AnimationState.Stopped) { return PlayState.CONTINUE; } - // Swing finished, fall through to idle + // Swing finished — check if use started, blend directly from swing end pose } // --- Use ---