execute if score generation state matches 10 run particle portal 0 53 0 .7 1 .7 0 15 force
execute if score generation state matches 10 run particle portal 0 52.5 0 .75 1 .75 1 15 force

execute as @a at @s if block ~ ~-1 ~ orange_concrete run title @s actionbar ["",{"text":"[!] ","color":"red","bold":true},{"translate":"msg.generation.incomplete","color":"gray","bold":false}]
execute as @a at @s if block ~ ~-1 ~ black_concrete run title @s actionbar ["",{"text":"[!] ","color":"red","bold":true},{"translate":"msg.generation.incomplete","color":"gray","bold":false}]

# Generated or not
execute if score generation state matches 0 run fill -1 52 -1 1 52 1 black_concrete replace
execute if score generation state matches 1..9 run fill -1 52 -1 1 52 1 orange_concrete replace
execute if score generation state matches 10 run fill -1 52 -1 1 52 1 green_concrete replace


# Warp player
execute positioned -1.1 53 -1.1 at @a[limit=1,dx=2.2,dz=2.2] if block ~ ~-1 ~ green_concrete run function lobby:warp/warp
