## Use bait (not heart of the sea)
# Random value
execute store result score @s vb.dummy1 run random value 1..2
# Retaining enchantment
execute if predicate {condition:"minecraft:entity_properties",entity:"this",predicate:{equipment:{mainhand:{predicates:{"minecraft:enchantments":[{enchantments:"vb:retaining"}]}}}}} store result score @s vb.dummy1 run random value 1..4
execute if predicate {condition:"minecraft:entity_properties",entity:"this",predicate:{equipment:{offhand:{predicates:{"minecraft:enchantments":[{enchantments:"vb:retaining"}]}}}}} store result score @s vb.dummy1 run random value 1..4
# Use up bait
$execute if score @s vb.dummy1 matches 1 unless items entity @s weapon.$(slot) minecraft:heart_of_the_sea run item modify entity @s weapon.$(slot) {function:"minecraft:set_count",count:-1,add:1b}
