execute in minecraft:the_end run scoreboard players operation #stellarity.exit_gateway_count stellarity.misc = @n[type=marker,tag=fe.exit_portal] stellarity.dragon.times_killed

execute if score #stellarity.exit_gateway_count stellarity.misc matches 1 run function far_end:structures/exit_portal/gateway/locations/1
execute if score #stellarity.exit_gateway_count stellarity.misc matches 2 run function far_end:structures/exit_portal/gateway/locations/2
execute if score #stellarity.exit_gateway_count stellarity.misc matches 3 run function far_end:structures/exit_portal/gateway/locations/3
execute if score #stellarity.exit_gateway_count stellarity.misc matches 4 run function far_end:structures/exit_portal/gateway/locations/4
execute if score #stellarity.exit_gateway_count stellarity.misc matches 5 run function far_end:structures/exit_portal/gateway/locations/5
execute if score #stellarity.exit_gateway_count stellarity.misc matches 6 run function far_end:structures/exit_portal/gateway/locations/6
execute if score #stellarity.exit_gateway_count stellarity.misc matches 7 run function far_end:structures/exit_portal/gateway/locations/7
execute if score #stellarity.exit_gateway_count stellarity.misc matches 8 run function far_end:structures/exit_portal/gateway/locations/8
execute if score #stellarity.exit_gateway_count stellarity.misc matches 9 run function far_end:structures/exit_portal/gateway/locations/9
execute if score #stellarity.exit_gateway_count stellarity.misc matches 10 run function far_end:structures/exit_portal/gateway/locations/10
execute if score #stellarity.exit_gateway_count stellarity.misc matches 11 run function far_end:structures/exit_portal/gateway/locations/11
execute if score #stellarity.exit_gateway_count stellarity.misc matches 12 run function far_end:structures/exit_portal/gateway/locations/12
execute if score #stellarity.exit_gateway_count stellarity.misc matches 13 run function far_end:structures/exit_portal/gateway/locations/13
execute if score #stellarity.exit_gateway_count stellarity.misc matches 14 run function far_end:structures/exit_portal/gateway/locations/14
execute if score #stellarity.exit_gateway_count stellarity.misc matches 15 run function far_end:structures/exit_portal/gateway/locations/15
execute if score #stellarity.exit_gateway_count stellarity.misc matches 16 run function far_end:structures/exit_portal/gateway/locations/16
execute if score #stellarity.exit_gateway_count stellarity.misc matches 17 run function far_end:structures/exit_portal/gateway/locations/17
execute if score #stellarity.exit_gateway_count stellarity.misc matches 18 run function far_end:structures/exit_portal/gateway/locations/18
execute if score #stellarity.exit_gateway_count stellarity.misc matches 19 run function far_end:structures/exit_portal/gateway/locations/19
execute if score #stellarity.exit_gateway_count stellarity.misc matches 20 run function far_end:structures/exit_portal/gateway/locations/20
