execute if data entity @s {Item:{count:1}} if block ~ ~-.1 ~ #anvil if data entity @n[type=item,nbt={Item:{count:1}},distance=...3,predicate=survivalplus:item/equipment/equipment] Item.components."minecraft:attribute_modifiers"[0] run tag @n[type=item,nbt={Item:{count:1}},distance=...3,predicate=survivalplus:item/equipment/equipment] add reforging
execute if entity @e[tag=reforging] run kill @s
execute as @e[tag=reforging] at @s run function survivalplus:tools/reforge/new