## Runs from controller.animation.dungeon_spawner.detect
## @s = ldz:dungeon_spawner,family=wraith_spawner

scoreboard objectives add temp dummy
scoreboard players random @s temp 1 5
execute as @s[scores={temp=1}] run summon ldz:ender_wraith ~ ~ ~
execute as @s[scores={temp=2}] run summon ldz:ender_wraith ~ ~ ~2
execute as @s[scores={temp=3}] run summon ldz:ender_wraith ~ ~ ~-2
execute as @s[scores={temp=4}] run summon ldz:ender_wraith ~2 ~ ~
execute as @s[scores={temp=5}] run summon ldz:ender_wraith ~-2 ~ ~
scoreboard objectives remove temp