execute if block ~ ~ ~ torch run tag @s add nofire
execute if block ~ ~ ~ wall_torch run tag @s add nofire
execute as @s[tag=nofire] run data merge entity @s {Fire:-1s}
execute if entity @s[tag=alreadytorch] run summon item ~ ~ ~ {Item:{id:torch}}
tag @s remove specialarrow
tag @s remove torcharrow
tag @s remove nofire
tag @s remove alreadytorch