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



# BIOME SET #

execute if score fake_player ib_minedcount matches 1501 run function simply_oneblock:ib_biomefill/lush_caves

execute if score fake_player ib_minedcount matches 1501 run tellraw @a ["",{"text":"\n\n\n\n\n\n\n\nThe block's energy seems to have changed again","italic":true,"color":"gray"},{"text":"\n\n"},{"text":"The atmosphere has finally warmed up, and the temperature is more bearable, although still a little low. The gentle trickle of water in the distance reassures you and a sweet smell envelops you. You feel more serene, despite the strange hue that the sky has taken on, but which no longer carries with it a threatening atmosphere.","color":"aqua"}]



# GRAVITY WARNING #

execute if entity @e[type=minecraft:falling_block,x=0,y=64,z=0] run tellraw @a {"text":"\n\n\n\n\n\n\n\nSome blocks are subject to gravity, placing a solid block under the infinite block should help","italic":true,"color":"yellow"}



# PARTICLE #

kill @e[type=area_effect_cloud,x=0,y=64,z=0]
summon area_effect_cloud 0.5 65.5 0.5 {custom_particle:{type:ash},Radius:0.2,Duration:100000}



# BLOCK RANDOMIZER #

execute if score fake_player ib_minedcount matches 1501..1999 store result score fake_player ib_randomizer run random value 1..190

execute if score fake_player ib_randomizer matches 1..25 run setblock 0 64 0 minecraft:dripstone_block
execute if score fake_player ib_randomizer matches 26..50 run setblock 0 64 0 minecraft:clay
execute if score fake_player ib_randomizer matches 51..75 run setblock 0 64 0 minecraft:moss_block
execute if score fake_player ib_randomizer matches 76..85 run setblock 0 64 0 minecraft:tuff
execute if score fake_player ib_randomizer matches 86..95 run setblock 0 64 0 minecraft:smooth_basalt
execute if score fake_player ib_randomizer matches 96..105 run setblock 0 64 0 minecraft:calcite
execute if score fake_player ib_randomizer matches 106..120 run setblock 0 64 0 minecraft:rooted_dirt
execute if score fake_player ib_randomizer matches 121..130 run setblock 0 64 0 minecraft:copper_ore
execute if score fake_player ib_randomizer matches 131..140 run setblock 0 64 0 minecraft:oak_log[axis=y]
execute if score fake_player ib_randomizer matches 141..150 run setblock 0 64 0 minecraft:amethyst_block

execute if score fake_player ib_randomizer matches 151..155 run setblock 0 64 0 minecraft:stone
execute if score fake_player ib_randomizer matches 156..160 run setblock 0 64 0 minecraft:grass_block
execute if score fake_player ib_randomizer matches 161..163 run setblock 0 64 0 minecraft:gravel
execute if score fake_player ib_randomizer matches 164..166 run setblock 0 64 0 minecraft:diorite
execute if score fake_player ib_randomizer matches 167..169 run setblock 0 64 0 minecraft:andesite
execute if score fake_player ib_randomizer matches 170..172 run setblock 0 64 0 minecraft:granite
execute if score fake_player ib_randomizer matches 173..174 run setblock 0 64 0 minecraft:deepslate
execute if score fake_player ib_randomizer matches 175..178 run setblock 0 64 0 minecraft:coal_ore
execute if score fake_player ib_randomizer matches 179 run setblock 0 64 0 minecraft:deepslate_coal_ore
execute if score fake_player ib_randomizer matches 180 run setblock 0 64 0 minecraft:deepslate_copper_ore
execute if score fake_player ib_randomizer matches 181 run setblock 0 64 0 minecraft:iron_ore
execute if score fake_player ib_randomizer matches 182 run setblock 0 64 0 minecraft:deepslate_iron_ore
execute if score fake_player ib_randomizer matches 183 run setblock 0 64 0 minecraft:gold_ore
execute if score fake_player ib_randomizer matches 184 run setblock 0 64 0 minecraft:deepslate_gold_ore
execute if score fake_player ib_randomizer matches 185 run setblock 0 64 0 minecraft:lapis_ore
execute if score fake_player ib_randomizer matches 186 run setblock 0 64 0 minecraft:deepslate_lapis_ore
execute if score fake_player ib_randomizer matches 187 run setblock 0 64 0 minecraft:redstone_ore
execute if score fake_player ib_randomizer matches 188 run setblock 0 64 0 minecraft:deepslate_redstone_ore
execute if score fake_player ib_randomizer matches 189 run setblock 0 64 0 minecraft:diamond_ore
execute if score fake_player ib_randomizer matches 190 run setblock 0 64 0 minecraft:deepslate_diamond_ore



# CHESTS #

execute if score fake_player ib_minedcount matches 1561 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1562 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1621 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1622 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1681 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1682 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1741 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1742 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1801 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1802 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1861 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1862 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1921 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1922 run teleport @s 0 65 0

execute if score fake_player ib_minedcount matches 1981 run setblock 0 64 0 chest{LootTable:"simply_oneblock:lush"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 1982 run teleport @s 0 65 0



# MOBS RANDOMIZER #

# Axolotl #

execute if score fake_player ib_minedcount matches 1685 store result score fake_player ib_mob_randomizer run random value 1..100
execute if score fake_player ib_minedcount matches 1685 run playsound minecraft:entity.player.teleport block @a 0 66 0
execute if score fake_player ib_minedcount matches 1685 run playsound minecraft:entity.axolotl.idle_air block @a 0 66 0

execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 1..20 run summon minecraft:axolotl 0 66 0 {Variant:0,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 21..40 run summon minecraft:axolotl 0 66 0 {Variant:1,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 41..60 run summon minecraft:axolotl 0 66 0 {Variant:2,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 61..80 run summon minecraft:axolotl 0 66 0 {Variant:3,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 81..100 run summon minecraft:axolotl 0 66 0 {Variant:4,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 11..20 run summon minecraft:axolotl 0 66 0 {Variant:3,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 31..40 run summon minecraft:axolotl 0 66 0 {Variant:4,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 51..60 run summon minecraft:axolotl 0 66 0 {Variant:0,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 71..80 run summon minecraft:axolotl 0 66 0 {Variant:1,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 91..100 run summon minecraft:axolotl 0 66 0 {Variant:2,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 1..10 run summon minecraft:axolotl 0 66 0 {Variant:0,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 21..30 run summon minecraft:axolotl 0 66 0 {Variant:1,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 41..50 run summon minecraft:axolotl 0 66 0 {Variant:2,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 61..70 run summon minecraft:axolotl 0 66 0 {Variant:3,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1685 if score fake_player ib_mob_randomizer matches 81..90 run summon minecraft:axolotl 0 66 0 {Variant:4,PersistenceRequired:1b,Age:-24000}

# Axolotl #

execute if score fake_player ib_minedcount matches 1861 store result score fake_player ib_mob_randomizer run random value 1..100
execute if score fake_player ib_minedcount matches 1861 run playsound minecraft:entity.player.teleport block @a 0 66 0
execute if score fake_player ib_minedcount matches 1861 run playsound minecraft:entity.axolotl.idle_air block @a 0 66 0

execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 1..20 run summon minecraft:axolotl 0 66 0 {Variant:0,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 21..40 run summon minecraft:axolotl 0 66 0 {Variant:1,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 41..60 run summon minecraft:axolotl 0 66 0 {Variant:2,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 61..80 run summon minecraft:axolotl 0 66 0 {Variant:3,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 81..100 run summon minecraft:axolotl 0 66 0 {Variant:4,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 11..20 run summon minecraft:axolotl 0 66 0 {Variant:3,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 31..40 run summon minecraft:axolotl 0 66 0 {Variant:4,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 51..60 run summon minecraft:axolotl 0 66 0 {Variant:0,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 71..80 run summon minecraft:axolotl 0 66 0 {Variant:1,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 91..100 run summon minecraft:axolotl 0 66 0 {Variant:2,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 1..10 run summon minecraft:axolotl 0 66 0 {Variant:0,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 21..30 run summon minecraft:axolotl 0 66 0 {Variant:1,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 41..50 run summon minecraft:axolotl 0 66 0 {Variant:2,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 61..70 run summon minecraft:axolotl 0 66 0 {Variant:3,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1861 if score fake_player ib_mob_randomizer matches 81..90 run summon minecraft:axolotl 0 66 0 {Variant:4,PersistenceRequired:1b,Age:-24000}


