scoreboard players add @s generic_timer 1

tp @s ^ ^ ^0.7

particle minecraft:flame ~ ~ ~ 0 0 0 0.015 3 force @a
particle minecraft:small_flame ~ ~ ~ 0 0 0 0.035 1 force @a
particle minecraft:smoke ~ ~ ~ 0 0 0 0.015 1 force @a

tag @s add flame_temp
execute positioned ~-0.25 ~-0.25 ~-0.25 as @e[dx=0.5,dy=0.5,dz=0.5,type=!#pctf:cannot_be_hit,sort=nearest,limit=2] at @s run function pctf:logic/items/flamethrower/collide
tag @s remove flame_temp

execute unless block ~ ~ ~ #pctf:projectile_pass run function pctf:logic/items/flamethrower/detonate

execute if score @s generic_timer matches 10.. run function pctf:logic/items/flamethrower/detonate