mojira.dev
MC-228598

Item count desync when firing an arrow while switching to a different hotbar slot

The bug consists of the number of arrows shown on the hot bar going down, when in reality it doesn't change. While you have a bow in your right hand, start the arrow animation and before the arrow fires switch to a different hot bar slot using the number keys on the keyboard. If executed correctly, no arrow is fired, but the number of arrows goes down.

To reproduce

  1. Switch into Survival mode

  2. Have arrows and a bow in your hotbar

  3. Draw the bow

  4. While letting go of the right mouse button, also press a hotkey to switch to a different slot
    → ❌ No arrow will be fired, but the arrow count decreases

When updating the arrow slot, the number will update to the previous one again.

Attachments

Comments 9

Before switching to an another slot do you fire the arrow or do you just switch?

Can confirm this does happen, can only be done in survival, you need to release the bow shot and switch to another slot at the same time which does not shoot the arrow, instead the items disappear making ghost items. To fix: simply update the arrows in your inventory or the slot they were in when you shot the bow. 

Can confirm this behavior in 1.17.1 and 1.18 Pre-release 2.

Can confirm in 1.18.1 and 22w07a.

Can confirm in 1.18.2 and 22w11a.

Can confirm in 1.19.1.

Can confirm in 1.19.2.

DimitaerZ

(Unassigned)

Confirmed

Platform

Normal

Networking

1.17, 1.17.1, 1.18.1, 22w07a, 1.18.2, ..., 1.19.2, 1.19.4, 23w14a, 1.20.1, 23w33a

24w18a

Retrieved