####################################################################################################### *** PHASE 7 - THE NETHER *** #######################################################################################################



# BIOME SET #

execute if score fake_player ib_minedcount matches 2001 run function simply_oneblock:ib_biomefill/warped_forest
execute if score fake_player ib_minedcount matches 2101 run function simply_oneblock:ib_biomefill/crimson_forest
execute if score fake_player ib_minedcount matches 2201 run function simply_oneblock:ib_biomefill/nether_wastes
execute if score fake_player ib_minedcount matches 2301 run function simply_oneblock:ib_biomefill/basalt_deltas
execute if score fake_player ib_minedcount matches 2401 run function simply_oneblock:ib_biomefill/soul_sand_valley

execute if score fake_player ib_minedcount matches 2001 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 air becomes suffocating, so hot that even your perspiration evaporates on your skin. Multiple creaking and grinding noises can be heard all around you. You don't know exactly what to expect, but you have the feeling that it would be wise to be on your guard.","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 2001..2499 store result score fake_player ib_randomizer run random value 1..130

# Warped Phase #

execute if score fake_player ib_minedcount matches 2001..2100 if score fake_player ib_randomizer matches 1..50 run setblock 0 64 0 minecraft:warped_nylium
execute if score fake_player ib_minedcount matches 2001..2100 if score fake_player ib_randomizer matches 51..80 run setblock 0 64 0 minecraft:warped_stem
execute if score fake_player ib_minedcount matches 2001..2100 if score fake_player ib_randomizer matches 81..92 run setblock 0 64 0 minecraft:warped_wart_block
execute if score fake_player ib_minedcount matches 2001..2100 if score fake_player ib_randomizer matches 93..100 run setblock 0 64 0 minecraft:shroomlight

# Crimson Phase #

execute if score fake_player ib_minedcount matches 2101..2200 if score fake_player ib_randomizer matches 1..50 run setblock 0 64 0 minecraft:crimson_nylium
execute if score fake_player ib_minedcount matches 2101..2200 if score fake_player ib_randomizer matches 51..80 run setblock 0 64 0 minecraft:crimson_stem
execute if score fake_player ib_minedcount matches 2101..2200 if score fake_player ib_randomizer matches 81..92 run setblock 0 64 0 minecraft:nether_wart_block
execute if score fake_player ib_minedcount matches 2101..2200 if score fake_player ib_randomizer matches 93..100 run setblock 0 64 0 minecraft:shroomlight

# Nether Wastes Phase #

execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 1..45 run setblock 0 64 0 minecraft:netherrack
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 46..55 run setblock 0 64 0 minecraft:glowstone
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 56..60 run setblock 0 64 0 minecraft:soul_sand
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 61..70 run setblock 0 64 0 minecraft:nether_quartz_ore
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 71..80 run setblock 0 64 0 minecraft:nether_gold_ore
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 81 run setblock 0 64 0 minecraft:ancient_debris
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 82..85 run setblock 0 64 0 minecraft:magma_block
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 86..90 run setblock 0 64 0 minecraft:blackstone
execute if score fake_player ib_minedcount matches 2201..2300 if score fake_player ib_randomizer matches 91..100 run setblock 0 64 0 minecraft:gravel

# Basalt Deltas Phase #

execute if score fake_player ib_minedcount matches 2301..2400 if score fake_player ib_randomizer matches 1..50 run setblock 0 64 0 minecraft:basalt
execute if score fake_player ib_minedcount matches 2301..2400 if score fake_player ib_randomizer matches 51..65 run setblock 0 64 0 minecraft:magma_block
execute if score fake_player ib_minedcount matches 2301..2400 if score fake_player ib_randomizer matches 66..100 run setblock 0 64 0 minecraft:blackstone

# Soul Valley Phase #

execute if score fake_player ib_minedcount matches 2401..2499 if score fake_player ib_randomizer matches 1..45 run setblock 0 64 0 minecraft:soul_soil
execute if score fake_player ib_minedcount matches 2401..2499 if score fake_player ib_randomizer matches 46..75 run setblock 0 64 0 minecraft:soul_sand
execute if score fake_player ib_minedcount matches 2401..2499 if score fake_player ib_randomizer matches 76..85 run setblock 0 64 0 minecraft:basalt
execute if score fake_player ib_minedcount matches 2401..2499 if score fake_player ib_randomizer matches 86..95 run setblock 0 64 0 minecraft:gravel
execute if score fake_player ib_minedcount matches 2401..2499 if score fake_player ib_randomizer matches 96..100 run setblock 0 64 0 minecraft:bone_block

# Crossphase #

execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 101..110 run setblock 0 64 0 minecraft:netherrack
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 111..115 run setblock 0 64 0 minecraft:gravel
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 116..118 run setblock 0 64 0 minecraft:glowstone
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 119..120 run setblock 0 64 0 minecraft:polished_blackstone_bricks
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 121..122 run setblock 0 64 0 minecraft:cracked_polished_blackstone_bricks
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 123..124 run setblock 0 64 0 minecraft:nether_bricks
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 125..126 run setblock 0 64 0 minecraft:red_nether_bricks
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 127..128 run setblock 0 64 0 minecraft:nether_gold_ore
execute if score fake_player ib_minedcount matches 2001..2499 if score fake_player ib_randomizer matches 129..130 run setblock 0 64 0 minecraft:nether_quartz_ore



# CHESTS #

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

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

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

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

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

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

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

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



# MOBS RANDOMIZER #

# Enderman #

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

execute if score fake_player ib_minedcount matches 2071 run summon minecraft:enderman 0 66 0 {PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2071 run summon minecraft:enderman 0 66 0 {PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2071 if score fake_player ib_mob_randomizer matches 1..40 run summon minecraft:enderman 0 66 0 {PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2071 if score fake_player ib_mob_randomizer matches 60..100 run summon minecraft:enderman 0 66 0 {PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2071 if score fake_player ib_mob_randomizer matches 25..75 run summon minecraft:enderman 0 66 0 {PersistenceRequired:1b,CanPickUpLoot:1b}

# Hoglin #

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

execute if score fake_player ib_minedcount matches 2145 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2145 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2145 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,ForcedAge:-24000,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2145 if score fake_player ib_mob_randomizer matches 1..15 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2145 if score fake_player ib_mob_randomizer matches 26..40 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,ForcedAge:-24000,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2145 if score fake_player ib_mob_randomizer matches 51..65 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2145 if score fake_player ib_mob_randomizer matches 76..90 run summon minecraft:hoglin 0 66 0 {IsImmuneToZombification:1,CannotBeHunted:1,PersistenceRequired:1b,ForcedAge:-24000,CanPickUpLoot:1b}

# Piglin #

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

execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 1..25 run summon minecraft:piglin 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:golden_sword}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 26..50 run summon minecraft:piglin 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:piglin_brute 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:golden_axe}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 76..100 run summon minecraft:piglin 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:golden_sword}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 51..75 run summon minecraft:piglin 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:piglin_brute 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:golden_axe}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 76..100 run summon minecraft:piglin 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:golden_sword}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 1..25 run summon minecraft:piglin 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 26..76 run summon minecraft:piglin_brute 0 66 0 {IsImmuneToZombification:1,PersistenceRequired:1b,equipment:{mainhand:{id:golden_axe}},CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 15..35 run summon minecraft:piglin 0 66 0 {IsBaby:1,IsImmuneToZombification:1,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 2190 if score fake_player ib_mob_randomizer matches 65..85 run summon minecraft:piglin 0 66 0 {IsBaby:1,IsImmuneToZombification:1,PersistenceRequired:1b,CanPickUpLoot:1b}

# Magma Cube #

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

execute if score fake_player ib_minedcount matches 2245 run summon minecraft:magma_cube 0 66 0 {PersistenceRequired:1b,Size:3}
execute if score fake_player ib_minedcount matches 2245 run summon minecraft:magma_cube 0 66 0 {PersistenceRequired:1b,Size:3}
execute if score fake_player ib_minedcount matches 2245 if score fake_player ib_mob_randomizer matches 1..40 run summon minecraft:magma_cube 0 66 0 {PersistenceRequired:1b,Size:3}
execute if score fake_player ib_minedcount matches 2245 if score fake_player ib_mob_randomizer matches 60..100 run summon minecraft:magma_cube 0 66 0 {PersistenceRequired:1b,Size:3}
execute if score fake_player ib_minedcount matches 2245 if score fake_player ib_mob_randomizer matches 25..75 run summon minecraft:magma_cube 0 66 0 {PersistenceRequired:1b,Size:3}

# Ghast #

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

execute if score fake_player ib_minedcount matches 2290 run summon minecraft:ghast 0 80 0
execute if score fake_player ib_minedcount matches 2290 run summon minecraft:ghast 0 80 0
execute if score fake_player ib_minedcount matches 2290 if score fake_player ib_mob_randomizer matches 35..65 run summon minecraft:ghast 0 80 0

# Strider #

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

execute if score fake_player ib_minedcount matches 2345 run summon minecraft:strider 0 66 0 {Variant:temperate,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 2345 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:strider 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 2345 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:strider 0 66 0 {PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 2345 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:strider 0 66 0 {PersistenceRequired:1b}

# Blaze #

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

execute if score fake_player ib_minedcount matches 2445 run summon minecraft:blaze 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 2445 run summon minecraft:blaze 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 2445 if score fake_player ib_mob_randomizer matches 1..40 run summon minecraft:blaze 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 2445 if score fake_player ib_mob_randomizer matches 60..100 run summon minecraft:blaze 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 2445 if score fake_player ib_mob_randomizer matches 25..75 run summon minecraft:blaze 0 66 0 {PersistenceRequired:1b}

# Wither Skeleton #

execute if score fake_player ib_minedcount matches 2490 store result score fake_player ib_mob_randomizer run random value 1..100
execute if score fake_player ib_minedcount matches 2490 run playsound minecraft:entity.player.teleport block @a 0 66 0
execute if score fake_player ib_minedcount matches 2490 run playsound minecraft:entity.wither_skeleton.ambient block @a 0 66 0
execute if score fake_player ib_minedcount matches 2490 run summon minecraft:wither_skeleton 0 66 0 {PersistenceRequired:1b,equipment:{mainhand:{id:stone_sword}}}
execute if score fake_player ib_minedcount matches 2490 run summon minecraft:wither_skeleton 0 66 0 {PersistenceRequired:1b,equipment:{mainhand:{id:stone_sword}}}
execute if score fake_player ib_minedcount matches 2490 if score fake_player ib_mob_randomizer matches 1..40 run summon minecraft:wither_skeleton 0 66 0 {PersistenceRequired:1b,equipment:{mainhand:{id:stone_sword}}}
execute if score fake_player ib_minedcount matches 2490 if score fake_player ib_mob_randomizer matches 60..100 run summon minecraft:wither_skeleton 0 66 0 {PersistenceRequired:1b,equipment:{mainhand:{id:stone_sword}}}
execute if score fake_player ib_minedcount matches 2490 if score fake_player ib_mob_randomizer matches 25..75 run summon minecraft:wither_skeleton 0 66 0 {PersistenceRequired:1b,equipment:{mainhand:{id:stone_sword}}}


