################################################################################################ *** PHASE 5 - SNOWY PLAINS & MOUNTAINS *** ################################################################################################



# BIOME SET #

execute if score fake_player ib_minedcount matches 1001 run function simply_oneblock:ib_biomefill/grove

execute if score fake_player ib_minedcount matches 1001 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 temperature has continued to drop until it's freezing, and despite a clear sky, the timid rays of sunshine can't seem to warm you up. Only a few light crunches of snow in the distance manage to break the deathly silence.","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 1001..1499 store result score fake_player ib_randomizer run random value 1..130

execute if score fake_player ib_randomizer matches 1..35 run setblock 0 64 0 minecraft:snow_block
execute if score fake_player ib_randomizer matches 36..45 run setblock 0 64 0 minecraft:stone
execute if score fake_player ib_randomizer matches 46..55 run setblock 0 64 0 minecraft:cobblestone
execute if score fake_player ib_randomizer matches 56..65 run setblock 0 64 0 minecraft:spruce_log[axis=y]
execute if score fake_player ib_randomizer matches 66..75 run setblock 0 64 0 minecraft:grass_block
execute if score fake_player ib_randomizer matches 76..85 run setblock 0 64 0 minecraft:coarse_dirt
execute if score fake_player ib_randomizer matches 86..95 run setblock 0 64 0 minecraft:packed_ice
execute if score fake_player ib_randomizer matches 96..100 run setblock 0 64 0 minecraft:blue_ice

execute if score fake_player ib_randomizer matches 101..104 run setblock 0 64 0 minecraft:gravel
execute if score fake_player ib_randomizer matches 105..109 run setblock 0 64 0 minecraft:diorite
execute if score fake_player ib_randomizer matches 110..112 run setblock 0 64 0 minecraft:andesite
execute if score fake_player ib_randomizer matches 113..114 run setblock 0 64 0 minecraft:granite
execute if score fake_player ib_randomizer matches 115 run setblock 0 64 0 minecraft:deepslate
execute if score fake_player ib_randomizer matches 116..117 run setblock 0 64 0 minecraft:coal_ore
execute if score fake_player ib_randomizer matches 118 run setblock 0 64 0 minecraft:deepslate_coal_ore
execute if score fake_player ib_randomizer matches 119 run setblock 0 64 0 minecraft:copper_ore
execute if score fake_player ib_randomizer matches 120 run setblock 0 64 0 minecraft:deepslate_copper_ore
execute if score fake_player ib_randomizer matches 121 run setblock 0 64 0 minecraft:iron_ore
execute if score fake_player ib_randomizer matches 122 run setblock 0 64 0 minecraft:deepslate_iron_ore
execute if score fake_player ib_randomizer matches 123 run setblock 0 64 0 minecraft:gold_ore
execute if score fake_player ib_randomizer matches 124 run setblock 0 64 0 minecraft:deepslate_gold_ore
execute if score fake_player ib_randomizer matches 125 run setblock 0 64 0 minecraft:lapis_ore
execute if score fake_player ib_randomizer matches 126 run setblock 0 64 0 minecraft:deepslate_lapis_ore
execute if score fake_player ib_randomizer matches 127 run setblock 0 64 0 minecraft:redstone_ore
execute if score fake_player ib_randomizer matches 128 run setblock 0 64 0 minecraft:deepslate_redstone_ore
execute if score fake_player ib_randomizer matches 129 run setblock 0 64 0 minecraft:diamond_ore
execute if score fake_player ib_randomizer matches 130 run setblock 0 64 0 minecraft:deepslate_diamond_ore



# CHESTS #

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

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

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

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

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

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

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

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



# MOBS RANDOMIZER #

# Goat #

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

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

# Rabbit #

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

execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:rabbit 0 66 0 {RabbitType:1,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:rabbit 0 66 0 {RabbitType:3,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:rabbit 0 66 0 {RabbitType:3,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:rabbit 0 66 0 {RabbitType:1,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 11..20 run summon minecraft:rabbit 0 66 0 {RabbitType:1,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 21..30 run summon minecraft:rabbit 0 66 0 {RabbitType:3,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 41..50 run summon minecraft:rabbit 0 66 0 {RabbitType:1,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1161 if score fake_player ib_mob_randomizer matches 51..60 run summon minecraft:rabbit 0 66 0 {RabbitType:3,PersistenceRequired:1b,Age:-24000}

# Wolf #

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

execute if score fake_player ib_minedcount matches 1241 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:wolf 0 66 0 {variant:ashen,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1241 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:wolf 0 66 0 {variant:snowy,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1241 if score fake_player ib_mob_randomizer matches 25..45 run summon minecraft:wolf 0 66 0 {variant:ashen,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1241 if score fake_player ib_mob_randomizer matches 55..75 run summon minecraft:wolf 0 66 0 {variant:ashen,PersistenceRequired:1b,Age:-24000}
execute if score fake_player ib_minedcount matches 1241 if score fake_player ib_mob_randomizer matches 1..20 run summon minecraft:wolf 0 66 0 {variant:snowy,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1241 if score fake_player ib_mob_randomizer matches 81..100 run summon minecraft:wolf 0 66 0 {variant:snowy,PersistenceRequired:1b,Age:-24000}

# Fox #

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

execute if score fake_player ib_minedcount matches 1321 run summon minecraft:fox 0 66 0 {Type:snow,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 1321 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:fox 0 66 0 {Type:snow,PersistenceRequired:1b,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 1321 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:fox 0 66 0 {Type:snow,PersistenceRequired:1b,Age:-24000,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 1321 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:fox 0 66 0 {Type:snow,PersistenceRequired:1b,CanPickUpLoot:1b}

# Polar Bear #

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

execute if score fake_player ib_minedcount matches 1401 run summon minecraft:polar_bear 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1401 if score fake_player ib_mob_randomizer matches 1..50 run summon minecraft:polar_bear 0 66 0 {PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 1401 if score fake_player ib_mob_randomizer matches 51..100 run summon minecraft:polar_bear 0 66 0 {PersistenceRequired:1b,Age:-24000}

# Villager #

execute if score fake_player ib_minedcount matches 1481 store result score fake_player ib_mob_randomizer run random value 1..100
execute if score fake_player ib_minedcount matches 1481 run playsound minecraft:entity.player.teleport block @a 0 66 0
execute if score fake_player ib_minedcount matches 1481 run playsound minecraft:entity.villager.ambient block @a 0 66 0 1 1.5
execute if score fake_player ib_minedcount matches 1481 run summon minecraft:villager 0 66 0 {VillagerData:{type:snow},PersistenceRequired:1b,Age:-24000,CanPickUpLoot:1b}
execute if score fake_player ib_minedcount matches 1481 run summon minecraft:villager 0 66 0 {VillagerData:{type:snow},PersistenceRequired:1b,Age:-24000,CanPickUpLoot:1b}


