mojira.dev
MC-298881

Attaching a Lead to a fence post has broken effects with other items in main and off hands

When attaching a lead to a fence post, if there is an item in the off hand it will be placed/used. It seems this was accounted for in the main hand, as the block places and then is removed, however it is still “missing” from the inventory in survival and re-appears when you try to move/place that item.

Steps to reproduce:

  • Put torches (or something placeable/usable) in your off hand

  • Right click on a mob with a lead in your main hand

  • Right click on a fence post to leash the mob to the post

  • Observe a torch (or whatever you had in your off hand) also got placed/used

Expected result:

  • Mob is leashed to the fence post without placing/using off hand item

Actual result:

  • Mob is leashed to the fence post and off hand item is placed/used


When attaching a lead to a fence post, if there is an item in the main hand it will attempt to be placed/used and will disappear from the inventory. The item will not have been placed, however it is still “missing” from the inventory in survival and re-appears when you try to move/place that item.

Steps to reproduce:

  • Put a torch (or something placeable/usable) in your main hand

  • Right click on a mob with a lead in your main hand

  • Right click on a fence post to leash the mob to the post

  • Observe a torch (or whatever you had in your off hand) attempted to be placed/used and is no longer in your inventory

  • Attempt to click on a nearby block to “place” your empty hand and the item appears, as if it was in that inventory slot

Expected result:

  • Mob is leashed to the fence post without placing/using main hand item and main hand item remains visible in inventory

Actual result:

  • Mob is leashed to the fence post and main hand item is missing from inventory, even though it did not get placed/used

Linked issues

Attachments

Comments 3

Can confirm in 1.21.6

Can confirm in 1.21.7

Taon2

(Unassigned)

Unconfirmed

(Unassigned)

1.21.6

Retrieved