## Get random trial spawner
execute store result score @s vb.dummy1 run random value 1..9
execute store result score @s vb.dummy2 run random value 1..4

## Place spawner
# Slime
execute if score @s vb.dummy1 matches 1 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:slime"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:slime"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 1 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:moss_block
# Husk
execute if score @s vb.dummy1 matches 2 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:husk"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:husk"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 2 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:chiseled_sandstone
# Spider
execute if score @s vb.dummy1 matches 3 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:spider"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:spider"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 3 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:stone
execute if score @s vb.dummy1 matches 3 run setblock ~1 ~ ~-1 minecraft:cobweb
execute if score @s vb.dummy1 matches 3 run setblock ~1 ~ ~1 minecraft:cobweb
execute if score @s vb.dummy1 matches 3 run setblock ~-1 ~ ~-1 minecraft:cobweb
execute if score @s vb.dummy1 matches 3 run setblock ~-1 ~ ~1 minecraft:cobweb
execute if score @s vb.dummy1 matches 3 run setblock ~ ~ ~1 minecraft:cobweb
# Zombie
execute if score @s vb.dummy1 matches 4 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:zombie"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:zombie"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 4 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:mossy_cobblestone
# Bogged
execute if score @s vb.dummy1 matches 5 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:bogged"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:bogged"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 5 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:podzol
execute if score @s vb.dummy1 matches 5 run setblock ~-1 ~ ~1 minecraft:red_mushroom
execute if score @s vb.dummy1 matches 5 run setblock ~1 ~ ~-1 minecraft:red_mushroom
execute if score @s vb.dummy1 matches 5 run setblock ~-1 ~-1 ~-1 minecraft:bone_block
execute if score @s vb.dummy1 matches 5 run setblock ~1 ~-1 ~1 minecraft:bone_block
# Skeleton
execute if score @s vb.dummy1 matches 6 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:skeleton"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:skeleton"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 6 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:bone_block
# Stray
execute if score @s vb.dummy1 matches 7 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:stray"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:stray"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 7 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:packed_ice
# Cave Spider
execute if score @s vb.dummy1 matches 8 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:cave_spider"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:cave_spider"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 8 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:podzol
execute if score @s vb.dummy1 matches 8 run setblock ~-1 ~ ~1 minecraft:red_mushroom
execute if score @s vb.dummy1 matches 8 run setblock ~1 ~ ~-1 minecraft:red_mushroom
execute if score @s vb.dummy1 matches 8 run setblock ~1 ~ ~1 minecraft:cobweb
execute if score @s vb.dummy1 matches 8 run setblock ~-1 ~ ~-1 minecraft:cobweb
execute if score @s vb.dummy1 matches 8 run setblock ~-1 ~-1 ~-1 minecraft:stone
execute if score @s vb.dummy1 matches 8 run setblock ~1 ~-1 ~1 minecraft:stone
# Silverfish
execute if score @s vb.dummy1 matches 9 run setblock ~ ~ ~ minecraft:trial_spawner{normal_config:{spawn_range:3,total_mobs:5,simultaneous_mobs:3,total_mobs_added_per_player:2,simultaneous_mobs_added_per_player:2,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:silverfish"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins",weight:1}]},ominous_config:{spawn_range:3,total_mobs:10,simultaneous_mobs:4,total_mobs_added_per_player:3,simultaneous_mobs_added_per_player:3,ticks_between_spawn:40,spawn_potentials:[{data:{entity:{id:"minecraft:silverfish"}},weight:1}],loot_tables_to_eject:[{data:"vb:spawners/chamber_ruins_ominous",weight:1}]},required_player_range:7,target_cooldown_length:30000}
execute if score @s vb.dummy1 matches 9 run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:stone_bricks
# Base
setblock ~ ~-1 ~ minecraft:waxed_exposed_copper
setblock ~1 ~-1 ~ minecraft:waxed_exposed_chiseled_copper
setblock ~-1 ~-1 ~ minecraft:waxed_exposed_chiseled_copper
setblock ~ ~-1 ~1 minecraft:waxed_exposed_chiseled_copper
setblock ~ ~-1 ~-1 minecraft:waxed_exposed_chiseled_copper
execute if score @s vb.dummy2 matches 1 run setblock ~1 ~-1 ~ minecraft:waxed_oxidized_chiseled_copper
execute if score @s vb.dummy2 matches 2 run setblock ~ ~-1 ~1 minecraft:waxed_oxidized_chiseled_copper
execute if score @s vb.dummy2 matches 3 run setblock ~-1 ~-1 ~ minecraft:waxed_oxidized_chiseled_copper
execute if score @s vb.dummy2 matches 4 run setblock ~ ~-1 ~-1 minecraft:waxed_oxidized_chiseled_copper

## Kill
kill @s