###################################################################################################### *** PHASE 11 - DARK FOREST *** ######################################################################################################



# BIOME SET #

execute if score fake_player ib_minedcount matches 4001 run function simply_oneblock:ib_biomefill/dark_forest

execute if score fake_player ib_minedcount matches 4001 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 is noticeably cooler and the grass takes on a darker hue as a strong forest smell settles around you. Although this rural atmosphere may seem pleasant, you can't shake the unpleasant feeling that you're being watched.","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 4001..4499 store result score fake_player ib_randomizer run random value 1..130

execute if score fake_player ib_randomizer matches 0..20 run setblock 0 64 0 minecraft:grass_block
execute if score fake_player ib_randomizer matches 21..60 run setblock 0 64 0 minecraft:dark_oak_log[axis=y]
execute if score fake_player ib_randomizer matches 61..70 run setblock 0 64 0 minecraft:oak_log[axis=y]
execute if score fake_player ib_randomizer matches 71..85 run setblock 0 64 0 minecraft:dirt
execute if score fake_player ib_randomizer matches 86..100 run setblock 0 64 0 minecraft:coarse_dirt

execute if score fake_player ib_randomizer matches 101..102 run setblock 0 64 0 minecraft:gravel
execute if score fake_player ib_randomizer matches 103..104 run setblock 0 64 0 minecraft:clay
execute if score fake_player ib_randomizer matches 105..106 run setblock 0 64 0 minecraft:sand
execute if score fake_player ib_randomizer matches 107..108 run setblock 0 64 0 minecraft:stone
execute if score fake_player ib_randomizer matches 109..110 run setblock 0 64 0 minecraft:diorite
execute if score fake_player ib_randomizer matches 110..111 run setblock 0 64 0 minecraft:andesite
execute if score fake_player ib_randomizer matches 112..113 run setblock 0 64 0 minecraft:granite
execute if score fake_player ib_randomizer matches 114 run setblock 0 64 0 minecraft:deepslate
execute if score fake_player ib_randomizer matches 115..116 run setblock 0 64 0 minecraft:coal_ore
execute if score fake_player ib_randomizer matches 117 run setblock 0 64 0 minecraft:deepslate_coal_ore
execute if score fake_player ib_randomizer matches 118 run setblock 0 64 0 minecraft:copper_ore
execute if score fake_player ib_randomizer matches 119 run setblock 0 64 0 minecraft:deepslate_copper_ore
execute if score fake_player ib_randomizer matches 120..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 4061 run setblock 0 64 0 chest{LootTable:"simply_oneblock:dark_forest"} replace
execute as @e[y=64,dy=1] at @s if score fake_player ib_minedcount matches 4062 run teleport @s 0 65 0

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

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

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

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

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

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

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



# MOBS RANDOMIZER #

# Pillager #

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

execute if score fake_player ib_minedcount matches 4090 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}
execute if score fake_player ib_minedcount matches 4090 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}
execute if score fake_player ib_minedcount matches 4090 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}
execute if score fake_player ib_minedcount matches 4090 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}

# Allay #

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

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

# Pillager x Vindicator #

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

execute if score fake_player ib_minedcount matches 4270 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}
execute if score fake_player ib_minedcount matches 4270 run summon minecraft:vindicator 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}
execute if score fake_player ib_minedcount matches 4270 run summon minecraft:vindicator 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}
execute if score fake_player ib_minedcount matches 4270 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}
execute if score fake_player ib_minedcount matches 4270 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:vindicator 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}
execute if score fake_player ib_minedcount matches 4270 if score fake_player ib_mob_randomizer matches 1..15 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}

# Allay #

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

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

# Pillager x Vindicator x Evoker #

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

execute if score fake_player ib_minedcount matches 4450 run summon minecraft:evoker 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b}
execute if score fake_player ib_minedcount matches 4450 run summon minecraft:vindicator 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}
execute if score fake_player ib_minedcount matches 4450 run summon minecraft:vindicator 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}
execute if score fake_player ib_minedcount matches 4450 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:pillager 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:crossbow,count:1}}}
execute if score fake_player ib_minedcount matches 4450 if score fake_player ib_mob_randomizer matches 36..65 run summon minecraft:vindicator 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b,equipment:{mainhand:{id:iron_axe,count:1}}}
execute if score fake_player ib_minedcount matches 4450 if score fake_player ib_mob_randomizer matches 1..15 run summon minecraft:evoker 0 66 0 {CanPickUpLoot:1b,PersistenceRequired:1b}


