## Check if we've already used an item
execute if score @s vb.tick_data.custom_item_rc matches 1.. run scoreboard players set @s vb.tick_data.right_click 0
execute if score @s vb.tick_data.right_click matches 1.. run scoreboard players set @s vb.tick_data.custom_item_rc 1

## Use
execute if score @s vb.tick_data.right_click matches 1.. run function vb:tick_player/custom_item/smoke_bomb/use

## Remove from hand
execute if score @s vb.tick_data.right_click matches 1.. if items entity @s weapon.mainhand *[custom_data~{vb.item.smoke_bomb:1b}] run item modify entity @s weapon.mainhand {function:"minecraft:set_count",count:-1,add:1b}
execute if score @s vb.tick_data.right_click matches 1.. unless items entity @s weapon.mainhand *[custom_data~{vb.item.smoke_bomb:1b}] run item modify entity @s weapon.offhand {function:"minecraft:set_count",count:-1,add:1b}
