-
Bug
-
Resolution: Duplicate
-
None
-
1.21
-
None
-
Community Consensus
-
Input, Inventory
-
Normal
-
Platform
Reproduction Steps:
- Hold leather horse armor in your offhand
- Hold another item (like coal) in your main hand
- Right-click, and notice how the items were swapped
Issue:
Equipable#swapWithEquipmentSlot calls LivingEntity#getEquipmentSlotForItem to get the slot for the item. The issue is that getEquipmentSlotForItem returns MAINHAND if the item is not usable by that entity (which in this case, leather horse armor returns false for canUseSlot)
So this causes swapWithEquipmentSlot to incorrectly swap the items, as it thinks that item can be used.
- duplicates
-
MC-273300 Horse armor and wolf armor swap from off-hand to main hand upon pressing the Use Item/Place Block key
- Resolved