################################################################################################# *** PHASE 6 - LUSH & DRIPSTONE CAVES *** #################################################################################################



# Portal_in creation #

execute unless block 0 65 0 minecraft:end_gateway run tellraw @a {"text":"A portal has appeared !","italic":true,"color":"yellow"}
execute unless block 0 65 0 minecraft:end_gateway run playsound minecraft:entity.illusioner.cast_spell block @a 0 66 0
execute run fill 0 65 0 0 66 0 minecraft:end_gateway
execute run setblock 0 64 0 minecraft:bedrock



# Teleportation_in #

execute as @a at @s in minecraft:overworld if predicate simply_oneblock:portal run execute in simply_oneblock:phase_6 run tp @s 5 76 0



# Dungeon set #

execute as @a in simply_oneblock:phase_6 run execute if block 0 76 0 minecraft:air run place template simply_oneblock:phase_6 -1 70 -15



# Portal_out creation #

execute as @a in simply_oneblock:phase_6 unless block 19 78 8 minecraft:end_gateway unless block 24 77 0 minecraft:chest{LootTable:"simply_oneblock:lush_final"} run tellraw @a {"text":"A portal has appeared !","italic":true,"color":"yellow"}
execute as @a in simply_oneblock:phase_6 unless block 19 78 8 minecraft:end_gateway unless block 24 77 0 minecraft:chest{LootTable:"simply_oneblock:lush_final"} run playsound minecraft:entity.illusioner.cast_spell block @a 19 78 8
execute as @a in simply_oneblock:phase_6 unless block 19 78 8 minecraft:end_gateway unless block 24 77 0 minecraft:chest{LootTable:"simply_oneblock:lush_final"} run execute in simply_oneblock:phase_6 run fill 19 78 8 19 79 8 minecraft:end_gateway



# Teleportation_back #

execute as @a at @s in simply_oneblock:phase_6 if predicate simply_oneblock:portal if score fake_player ib_minedcount matches 2000 run execute in minecraft:overworld run fill 0 64 0 0 66 0 minecraft:air