## Match my ID to that of the closest player
execute positioned ~ ~-0.85 ~ run scoreboard players operation @s vb.id.player = @p vb.id.player
# Store the ID
scoreboard players operation #VB vb.dummy1 = @s vb.id.player

## Apply bait
scoreboard players set @s vb.entity.guaranteed_fish 0
scoreboard players set @s vb.entity.can_reel_in_drowned_necromancer 0
scoreboard players set @s vb.entity.chance_boosted 0
execute if items entity @p[predicate=vb:matching_id/player] weapon.* #vb:guarantees_fish run scoreboard players set @s vb.entity.guaranteed_fish 1
execute if items entity @p[predicate=vb:matching_id/player] weapon.* #vb:fishing_bait run scoreboard players set @s vb.entity.chance_boosted 1
execute if items entity @p[predicate=vb:matching_id/player] weapon.* minecraft:heart_of_the_sea run scoreboard players set @s vb.entity.can_reel_in_drowned_necromancer 1

## Fireproof enchantment
execute if items entity @p[predicate=vb:matching_id/player] weapon.* *[enchantments~[{"vb:fireproof":1}]] run tag @s add vb.survives_lava