See attached screenshot
Expected behaviour:
Trident staying in hand
To reproduce:
Enter a multiplayer server,
Ask a player to hold up a trident and shift.
Observe how trident floats above hand
Linked issues
is duplicated by 17
relates to 2
Attachments
Comments 18
I tested this issue with other poses in MC-125748, but since it has been considered as a dupe, I'll explain it again.
This issue affects both single player and multiplayer, when holding the trident on the mainhand, offhand, and both, and while standing upright and swimming. You can also notice that duel wielding tridents on both hands makes the player lift both hands when attempting to throw it(MC-125337). While swimming, other items as well as the trident are affected by this hovering glitch.
Confirmed for 1.14.3-pre3
The issue is in the LayerHeldItem.renderHeldItem method (MCP 1.12.2 names). First the item is rotated by the arm rotation (translateToHand), and then if the player is sneaking it is translated 0.2 units downwards. However, this is 'downwards' relative to the arm rotation. When the arms are fully raised (aiming a trident when not swimming), the item is actually translated 0.2 units upwards. This can be fixed by applying arm rotations after the sneak translation.
Interestingly it seems this issue has been partially fixed (not sure exactly when, but testing in 1.14.4). Items are now positioned correctly while swimming, but the issue still exists for sneaking (the main focus of this report).
As of 19w39a, the issue also happens if you're not charging the trident, see MC-162374.
I also have this problem in single player