mojira.dev
MC-301863

Hand animation still plays with hand_animation_on_swap set to false

Attached is a resource pack that sets:

hand_animation_on_swap: false

in the diamond and emerald item definitions.

In the attached videos, I am using gold ingot as an example for how swapping looks normally (hand_animation_on_swap: true).

The hand_animation_on_swap property was introduced in https://www.minecraft.net/en-us/article/minecraft-1-21-4-pre-release-1 , where it is described as “boolean field describing if down-and-up animation should be played in first-person view when item stack is changed (either type, count or components)”. However, hand animations are still played when swapping between different item types.

The attached videos show the following scenarios:
video ”change selected slot”:

When changing the selected slot, no swap animation is played when only the components (item name in this case) change. This is the correct behavior.

However, when switching from gold ingot to diamond, a hand animation is played, even though the hand animation should be disabled for diamonds. Since this is a mix of disabled and enabled hand animations, I’m not sure whether this in and of itself is a bug, but I think not playing an animation makes more sense here. (and would be more useful for my use cases)

Then, when switching from gold to diamond or diamond and emerald, a swap animation is played, even though the animation is disabled for both items.

Additionally, in both cases the swapping animation is kind of broken here, as it switching from gold ingot to diamond is visualized as switching from diamond to diamond and switching from diamond to emerald is visualized as switching from emerald to emerald.

video “swap with offhand”:

When only the components change, everything works correctly. When the item type changes, the main hand plays a swap animation, while the off hand does not.



There is also an animation played when swapping from an empty hand to an item with disabled swap animation, which I don’t think should be there. I am assuming this is the same issue, as an empty hand is also just another item type: air.

Attachments

Comments 2

[media]
[media]
[media]

StudioCode

(Unassigned)

1478991

Confirmed

Expansion A

Player Animation

1.21.8, 25w36b

Retrieved