PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.75k stars 871 forks source link

fix: Fix `heldItemChanged` was not fired in all cases when the held item was changed #3392

Open zardoy opened 3 weeks ago

zardoy commented 3 weeks ago

it should not be in set_slot event, it should be updated whenever the slot is actually updated (e.g. by inventory manipulation)

rom1504 commented 3 weeks ago

If this is correct, please add a test to check what is not working before this PR