#pufferfish arrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:127b,Duration:1,ShowParticles:0b}]}] at @s run function proj:pufferfish_arrow
#sponge arrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:126b,Duration:1,ShowParticles:0b}]}] at @s run function proj:sponge_arrow
#fire rain arrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:124b,Duration:1,ShowParticles:0b}]}] at @s run function proj:fire_rain
#toxic arrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:119b,Duration:1,ShowParticles:0b}],inGround:1b}] at @s run function proj:toxic_arrow
#lightning arrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:116b,Duration:1,ShowParticles:0b}],inGround:1b}] at @s run function proj:lightning_arrow
#eldritch arrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:110b,Duration:1,ShowParticles:0b}],inGround:1b}] at @s run function proj:eldritch_arrow
#fireworkarrow
execute as @s[nbt={CustomPotionEffects:[{Id:32b,Amplifier:109b,Duration:1,ShowParticles:0b}]}] at @s unless entity @a[distance=..1] run function proj:firework_arrow
#kill bad arrows
execute as @s[nbt={CustomPotionEffects:[{Ambient:0b, ShowIcon:1b}],inGround:1b}] at @s run kill @s

#execute as @e[type=arrow] if data entity @s[nbt={CustomPotionEffects:[{Ambient:0b}],inGround:1b}]