## 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

## Damage item
#execute if score @s vb.tick_data.right_click matches 1.. if items entity @s weapon.mainhand *[custom_data~{vb.item.blaze_chakram:1b}] run item modify entity @s weapon.mainhand {function:"minecraft:set_damage",damage:-0.011,add:1}
#execute if score @s vb.tick_data.right_click matches 1.. unless items entity @s weapon.mainhand *[custom_data~{vb.item.blaze_chakram:1b}] run item modify entity @s weapon.offhand {function:"minecraft:set_damage",damage:-0.011,add:1}

## Launch
execute if score @s vb.tick_data.right_click matches 1.. run function vb:summon/blaze_chakram

## Remove from hand
scoreboard players set @s vb.dummy1 0
execute if score @s vb.tick_data.right_click matches 1.. if items entity @s weapon.mainhand *[custom_data~{vb.item.blaze_chakram:1b}] run scoreboard players set @s vb.dummy1 1
execute if score @s vb.tick_data.right_click matches 1.. if score @s vb.dummy1 matches 0 run item replace entity @s weapon.offhand with air
execute if score @s vb.tick_data.right_click matches 1.. if score @s vb.dummy1 matches 1 run item replace entity @s weapon.mainhand with air
