## Run by prisonersgardener
## Run from animation.ender_prisoner.spawn_target
## @s = ldz:ender_charger, ldz:ender_chef, ldz:ender_gardener, ldz:ender_hydro

## MYSTIC DUNGEON
execute as @s[type=ldz:ender_charger] run event entity @e[type=ldz:ender_target,family=ender_charger_target] despawn
execute as @s[type=ldz:ender_charger] run summon ldz:ender_target ^ ^ ^5 0 0 charger_target_1
execute as @s[type=ldz:ender_charger] run summon ldz:ender_target ^ ^ ^5 0 0 charger_target_2
#execute as @s[type=ldz:ender_charger] run summon ldz:ender_target ^ ^ ^5 0 0 charger_target_3
execute as @s[type=ldz:ender_charger] run summon ldz:ender_target ^ ^ ^5 0 0 charger_target_4
execute as @s[type=ldz:ender_charger] run summon ldz:ender_target ^ ^ ^5 0 0 charger_target_5
execute as @s[type=ldz:ender_charger] run teleport @e[type=ldz:ender_target,family=ender_charger_target_1] -514 167 -159
execute as @s[type=ldz:ender_charger] run teleport @e[type=ldz:ender_target,family=ender_charger_target_2] -512 167 -177
#execute as @s[type=ldz:ender_charger] run teleport @e[type=ldz:ender_target,family=ender_charger_target_3] -514 167 -159
execute as @s[type=ldz:ender_charger] run teleport @e[type=ldz:ender_target,family=ender_charger_target_4] -512 169 -191
execute as @s[type=ldz:ender_charger] run teleport @e[type=ldz:ender_target,family=ender_charger_target_5] -512 170 -197

## BEAST DUNGEON
execute as @s[type=ldz:ender_chef] run event entity @e[type=ldz:ender_target,family=ender_chef_target] despawn
execute as @s[type=ldz:ender_chef] run summon ldz:ender_target ^ ^ ^5 0 0 chef_target_1
execute as @s[type=ldz:ender_chef] run summon ldz:ender_target ^ ^ ^5 0 0 chef_target_2
execute as @s[type=ldz:ender_chef] run summon ldz:ender_target ^ ^ ^5 0 0 chef_target_3
execute as @s[type=ldz:ender_chef] run summon ldz:ender_target ^ ^ ^5 0 0 chef_target_4
execute as @s[type=ldz:ender_chef] run summon ldz:ender_target ^ ^ ^5 0 0 chef_target_5
execute as @s[type=ldz:ender_chef] run summon ldz:ender_target ^ ^ ^5 0 0 chef_target_6
execute as @s[type=ldz:ender_chef] run teleport @e[type=ldz:ender_target,family=ender_chef_target_1] 82 153 -475
execute as @s[type=ldz:ender_chef] run teleport @e[type=ldz:ender_target,family=ender_chef_target_2] 90 153 -473
execute as @s[type=ldz:ender_chef] run teleport @e[type=ldz:ender_target,family=ender_chef_target_3] 86 153 -464
execute as @s[type=ldz:ender_chef] run teleport @e[type=ldz:ender_target,family=ender_chef_target_4] 73 155 -461
execute as @s[type=ldz:ender_chef] run teleport @e[type=ldz:ender_target,family=ender_chef_target_5] 73 160 -472
execute as @s[type=ldz:ender_chef] run teleport @e[type=ldz:ender_target,family=ender_chef_target_6] 73 161 -476

## SCOURGE DUNGEON
execute as @s[type=ldz:ender_gardener] run event entity @e[type=ldz:ender_target,family=ender_gardener_target] despawn
execute as @s[type=ldz:ender_gardener] run summon ldz:ender_target ^ ^ ^5 0 0 gardener_target_1
execute as @s[type=ldz:ender_gardener] run summon ldz:ender_target ^ ^ ^5 0 0 gardener_target_2
execute as @s[type=ldz:ender_gardener] run summon ldz:ender_target ^ ^ ^5 0 0 gardener_target_3
execute as @s[type=ldz:ender_gardener] run summon ldz:ender_target ^ ^ ^5 0 0 gardener_target_4
execute as @s[type=ldz:ender_gardener] run summon ldz:ender_target ^ ^ ^5 0 0 gardener_target_5
execute as @s[type=ldz:ender_gardener] run teleport @e[type=ldz:ender_target,family=ender_gardener_target_1] 24 166 446
execute as @s[type=ldz:ender_gardener] run teleport @e[type=ldz:ender_target,family=ender_gardener_target_2] 19 166 454
execute as @s[type=ldz:ender_gardener] run teleport @e[type=ldz:ender_target,family=ender_gardener_target_3] 9 170 454
execute as @s[type=ldz:ender_gardener] run teleport @e[type=ldz:ender_target,family=ender_gardener_target_4] 8 172 439
execute as @s[type=ldz:ender_gardener] run teleport @e[type=ldz:ender_target,family=ender_gardener_target_5] 6 172 435

## WRAITH DUNGEON
execute as @s[type=ldz:ender_hydro] run event entity @e[type=ldz:ender_target,family=ender_hydro_target] despawn
execute as @s[type=ldz:ender_hydro] run summon ldz:ender_target ^ ^ ^5 0 0 hydro_target_1
execute as @s[type=ldz:ender_hydro] run summon ldz:ender_target ^ ^ ^5 0 0 hydro_target_2
execute as @s[type=ldz:ender_hydro] run summon ldz:ender_target ^ ^ ^5 0 0 hydro_target_3
execute as @s[type=ldz:ender_hydro] run summon ldz:ender_target ^ ^ ^5 0 0 hydro_target_4
execute as @s[type=ldz:ender_hydro] run summon ldz:ender_target ^ ^ ^5 0 0 hydro_target_5
execute as @s[type=ldz:ender_hydro] run teleport @e[type=ldz:ender_target,family=ender_hydro_target_1] 584 166 50
execute as @s[type=ldz:ender_hydro] run teleport @e[type=ldz:ender_target,family=ender_hydro_target_2] 584 166 42
execute as @s[type=ldz:ender_hydro] run teleport @e[type=ldz:ender_target,family=ender_hydro_target_3] 587 166 42
execute as @s[type=ldz:ender_hydro] run teleport @e[type=ldz:ender_target,family=ender_hydro_target_4] 588 172 46
execute as @s[type=ldz:ender_hydro] run teleport @e[type=ldz:ender_target,family=ender_hydro_target_5] 592 172 51


event entity @s add_attackable
event entity @s set_spawn_target_to_false