Description:
When a player holds right-click to use an item and switches to another hotbar slot using a number key, other players do not see the item-use animation update correctly. The player performing the action sees the animation normally.
Steps to reproduce:
Join a world with a second player who can observe you.
Put a usable item, such as a bow, golden apple, potion, or shield, in a hotbar slot.
Hold right-click to use the item.
While continuing to hold right-click, press a number key to switch to another hotbar slot.
Have the second player observe your item-use animation.
Additional information:
I can reproduce this with multiple item-use actions, including charging a bow, eating a golden apple, drinking a potion, and blocking with a shield. Switching hotbar slots with the mouse wheel while holding right-click does not produce the issue. I have observed the issue since at least Minecraft 1.7.10, and it is still present in 26.3.
Video evidence: The video below shows both players’ perspectives side by side. The left side shows the player using the item; the right side shows the other player observing them. When the item user switches hotbar slots with a number key while holding right-click, their own animation updates, but the animation seen by the other player does not. The video also shows that switching slots with the mouse wheel does not cause the issue.
https://www.youtube.com/watch?v=mthgsO7B5B8
EDIT: The video does not show that switching slots with the mouse wheel does not cause the issue but it does not, test it yourself if you like.