execute if entity @s[tag=south] if entity @a[dx=0,dy=0,dz=3,limit=1,gamemode=!spectator] run function traps:flamer/trigger
execute if entity @s[tag=north] if entity @a[dx=0,dy=0,dz=-3,limit=1,gamemode=!spectator] run function traps:flamer/trigger

execute if entity @s[tag=east] if entity @a[dx=3,dy=0,dz=0,limit=1,gamemode=!spectator] run function traps:flamer/trigger
execute if entity @s[tag=west] if entity @a[dx=-3,dy=0,dz=0,limit=1,gamemode=!spectator] run function traps:flamer/trigger

execute if entity @s[tag=up] if entity @a[dx=0,dy=3,dz=0,limit=1,gamemode=!spectator] run function traps:flamer/trigger
execute if entity @s[tag=down] if entity @a[dx=0,dy=-3,dz=0,limit=1,gamemode=!spectator] run function traps:flamer/trigger


execute if entity @s[tag=south] if entity @e[dx=0,dy=0,dz=3,limit=1,tag=!unspellable,type=!player] run function traps:flamer/trigger
execute if entity @s[tag=north] if entity @e[dx=0,dy=0,dz=-3,limit=1,tag=!unspellable,type=!player] run function traps:flamer/trigger

execute if entity @s[tag=east] if entity @e[dx=3,dy=0,dz=0,limit=1,tag=!unspellable,type=!player] run function traps:flamer/trigger
execute if entity @s[tag=west] if entity @e[dx=-3,dy=0,dz=0,limit=1,tag=!unspellable,type=!player] run function traps:flamer/trigger

execute if entity @s[tag=up] if entity @e[dx=0,dy=3,dz=0,limit=1,tag=!unspellable,type=!player] run function traps:flamer/trigger
execute if entity @s[tag=down] if entity @e[dx=0,dy=-3,dz=0,limit=1,tag=!unspellable,type=!player] run function traps:flamer/trigger
