# Rotate armor stand (must have a  trapdor at ~ ~-2 ~ or ~ ~ ~ for otientation)
# execute as @e[type=armor_stand,tag=!lobby,tag=!trap] at @s run function generate:3_done/entity_rotate
# execute as @e[type=#aec,tag=!gate,tag=!trap] at @s run function generate:3_done/entity_rotate

execute as @e[tag=holder] run data merge entity @s {CustomNameVisible:0b}
execute as @e[tag=shop_d,tag=!lobby] run data merge entity @s {CustomNameVisible:0b}

kill @e[type=!player,type=!painting,tag=!lobby,tag=!unspellable]


# Bossbar
bossbar set generation name [{"translate":"floor","color":"gold"},{"text":" "},{"score":{"name":"floor","objective":"dungeon"}}, {"translate":"msg.generation.generated.end","color":"gold"}]
bossbar set generation value 5
# Title
title @a title [{"text":">> ","color":"dark_red","bold":true},{"translate":"floor","color":"gold"},{"text":" "},{"score":{"name":"floor","objective":"dungeon"},"color":"gold"},{"translate":"msg.generation.generated.end","color":"gold"},{"text":" <<","color":"dark_red"}]
title @a subtitle {"translate":"msg.generation.generated.subtitle","color":"gray","bold":true}
# Msg players
tellraw @a [{"text":"","color":"gray"},{"text":"[!] ","color":"gold","bold":true},{"translate":"floor"},{"text":" "},{"score":{"name":"floor","objective":"dungeon"}},{"translate":"msg.generation.generated.end"},{"text":". "},{"translate":"msg.generation.generated.subtitle"},{"text":"."}]
# Sound
playsound custom.portal.spawn ambient @a 0 52 0 .2

kill @e[tag=gen_warning]


# indicate generation state
scoreboard players set generation state 10
scoreboard players set game state 0
