I have the following server side events:
BlockEvents.rightClicked('minecraft:dragon_head', (e) => {
...
e.item.shrink(1)
e.player.give('minecraft:glass_bottle')
...
})
ItemEvents.rightClicked('minecraft:glass_bottle', (e) => {
if (e.hand !== 'main_hand') return
...
console.log('fired')
})
If I right click a dragon head with a different item that triggers the item replacement code, the item event right click event ALSO fires. This doesn't not seem to make sense because the original right click was triggered with an item that was not a glass bottle. I don't think this should be able to chain across like that. Is there a way to prevent this?