diff --git a/Brilliance Datapack/TODO.md b/Brilliance Datapack/TODO.md index e8bb89c2..850d37ac 100644 --- a/Brilliance Datapack/TODO.md +++ b/Brilliance Datapack/TODO.md @@ -1,4 +1,7 @@ # Other TODO: +- Egg Hunt advancements can trigger by spectators. +- Check for TOO MANY mobs to correct them. +- Rusty Repaired advancement - Limit mobs per level to 30 for level controller. - Add Level 3, Level 4 & Backrooms to level controller mob control. - Config Info "booklet" needs to be updated with the new force saturation level diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/no_zones/summon_training_markers.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/no_zones/summon_training_markers.mcfunction new file mode 100644 index 00000000..b79ee32d --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/no_zones/summon_training_markers.mcfunction @@ -0,0 +1,9 @@ +kill @e[type=marker,tag=L0Z1] +kill @e[type=marker,tag=L0Z2] + +#TODO: populate with more markers. +# - Zone 1 - (1 spots) +summon minecraft:marker -483 132 2006 {Duration: 2147483647, Tags: ["no-zones", "zone_marker", "L0Z1"]} +# - Zone 2 - (1 spots) +summon minecraft:marker -516 132 2028 {Duration: 2147483647, Tags: ["no-zones", "zone_marker", "L0Z2"]} + diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_markers.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_markers.mcfunction index b242da96..e4f7366c 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_markers.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_markers.mcfunction @@ -17,5 +17,8 @@ execute if score $dungeon do2.config.mc.level4Zones matches 0 run function do2:d function do2:dungeon_setup/summon/no_zones/summon_level_3_markers function do2:dungeon_setup/summon/no_zones/summon_willy_markers +# Training Room Markers +function do2:dungeon_setup/summon/no_zones/summon_training + # Turn invisible *all* markers. function do2:dev/markers/turn_invisible/all diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_other_killers.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_other_killers.mcfunction index 517ad3ce..2b09b3b2 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_other_killers.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_other_killers.mcfunction @@ -5,7 +5,7 @@ execute as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":" # One Eyed Willy execute at @e[type=marker,tag=L2WILLY,limit=1,sort=random] run summon minecraft:drowned ~ ~ ~ {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["L2WILLY"], HandDropChances: [0.0f, 0.0f], Health: 20.0f, HandItems: [{id: "minecraft:trident", Count: 1b}, {}], CustomName: '{"text":"One Eyed Willie"}'} # Training Room Drowned -summon minecraft:drowned -516 132 2028 {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["L0TRAIN"], HandDropChances: [0.0f, 0.0f], Health: 20.0f, HandItems: [{id: "minecraft:trident", Count: 1b}, {}], CustomName: '{"text":"The Worst!!!"}'} +summon minecraft:drowned -516 132 2028 {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["L0Z2"], HandDropChances: [0.0f, 0.0f], Health: 20.0f, HandItems: [{id: "minecraft:trident", Count: 1b}, {}], CustomName: '{"text":"The Worst!!!"}'} # Davy Bones summon minecraft:minecart -576 13 1984 {PersistenceRequired:1b, Invulnerable:1b, Passengers:[{Invulnerable:1b, Tags: ["L2DAVY"], id: "minecraft:stray", Health: 20.0f, Silent: 1b, CustomName: '{"text":"Davey Bones"}',HandItems:[{id: "minecraft:bow", Count: 1b, tag:{Damage: 0, Enchantments:[{lvl: 1s, id: "minecraft:unbreaking"},{lvl: 1s, id: "minecraft:power"}]}}]}]} diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_ravagers.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_ravagers.mcfunction index 84ee3d88..88c82dc1 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_ravagers.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/summon/summon_ravagers.mcfunction @@ -27,4 +27,4 @@ execute if score $dungeon do2.config.mc.controlSummons matches 0 if score $dunge # Death Gauntlet Ravager summon minecraft:ravager -632 -48 1990 {PersistenceRequired:1b, Tags: ["L0DEATHROOM"], Invulnerable: 1b, Health: 100f, CustomName: '{"text":"nothing, they survived Decked Out"}', Fire: -1s} # Training Room Ravager -summon minecraft:ravager -483 132 2006 {PersistenceRequired:1b, Tags: ["L0TRAIN"], Invulnerable: 1b, Health: 100f, CustomName: '{"text":"Jellie"}', Fire: -1s} +summon minecraft:ravager -483 132 2006 {PersistenceRequired:1b, Tags: ["L0Z1"], Invulnerable: 1b, Health: 100f, CustomName: '{"text":"Jellie"}', Fire: -1s} diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_other_killers.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_other_killers.mcfunction index 9a1c0282..ab7d79b1 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_other_killers.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_other_killers.mcfunction @@ -26,7 +26,7 @@ scoreboard players set $dungeon do2.tests.all_killers_alive 0 # Check for One Eyed Willy execute unless entity @e[type=minecraft:drowned,tag=L2WILLY] run scoreboard players set $dungeon do2.tests.all_killers_alive 1 # Check for Training Room Drowned -execute unless entity @e[type=minecraft:drowned,tag=L0TRAIN] run scoreboard players set $dungeon do2.tests.all_killers_alive 2 +execute unless entity @e[type=minecraft:drowned,tag=L0Z2] run scoreboard players set $dungeon do2.tests.all_killers_alive 2 # Check for Davy Bones execute unless entity @e[type=minecraft:stray,tag=L2DAVY] run scoreboard players set $dungeon do2.tests.all_killers_alive 3 # Check for Evokers diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_ravagers.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_ravagers.mcfunction index a6ba26ef..fad08d5f 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_ravagers.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/test_for_ravagers.mcfunction @@ -33,7 +33,7 @@ execute unless entity @e[type=minecraft:ravager,tag=L2Z5] run scoreboard players # Death Room Ravager execute unless entity @e[type=minecraft:ravager,tag=L0DEATHROOM] run scoreboard players set $dungeon do2.tests.all_ravagers_alive 11 # Training Room Ravager -execute unless entity @e[type=minecraft:ravager,tag=L0TRAIN] run scoreboard players set $dungeon do2.tests.all_ravagers_alive 12 +execute unless entity @e[type=minecraft:ravager,tag=L0Z1] run scoreboard players set $dungeon do2.tests.all_ravagers_alive 12 execute unless score $dungeon do2.tests.all_ravagers_alive matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Missing Ravager §b#"},{"color":"aqua","score":{"name":"$dungeon","objective":"do2.tests.all_ravagers_alive"}}] execute unless score $dungeon do2.tests.all_ravagers_alive matches 0 run function do2:dungeon_setup/summon/ravagers diff --git a/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_numbered_ravager_name.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_numbered_ravager_name.mcfunction index 3d7ecbc5..7bbafc6d 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_numbered_ravager_name.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_numbered_ravager_name.mcfunction @@ -9,7 +9,7 @@ scoreboard players add $dungeon do2.tests.amountOfRavagers 1 # Summon a text_display entity, to convert data into raw text, to store the raw text as a mob name. summon minecraft:text_display -508 123 1956 {Tags:["ConvertToTextHelper"],text:'[{"text":"Ravager: #"},{"score":{"name":"$dungeon","objective":"do2.tests.amountOfRavagers"}}]'} data modify storage do2:mobs mobNames append from entity @e[type=minecraft:text_display,tag=ConvertToTextHelper,limit=1] text -scoreboard players add $dungeon do2.utility.mobNamesCount 1 +scoreboard players add $dungeon do2.utility.mc.mobNamesCount 1 # Cleanup kill @e[type=minecraft:text_display,tag=ConvertToTextHelper] @@ -17,4 +17,4 @@ scoreboard objectives remove do2.tests.amountOfRavagers scoreboard players remove $dungeon do2.tests.amountOfRavagers 1 # If there STILL isn't enough mobNames for the amount of names needed, loop this function. -execute if score $dungeon do2.utility.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/add_numbered_ravager_name +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/add_numbered_ravager_name diff --git a/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_ravager_name_to_list.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_ravager_name_to_list.mcfunction index 65b2f1f5..e5bc1800 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_ravager_name_to_list.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/add_mob_names/add_ravager_name_to_list.mcfunction @@ -13,7 +13,7 @@ function do2:level_controller/array_manipulation/get_from_index # add name to the list data modify storage do2:mobs mobNames append from storage do2:tests array[0] -scoreboard players add $dungeon do2.utility.mobNamesCount 1 +scoreboard players add $dungeon do2.utility.mc.mobNamesCount 1 # Remove the name as a valid name for future generation this time. @@ -25,4 +25,4 @@ data modify storage do2:mobs preset_names set from storage do2:tests newArray # If there STILL isn't enough mobNames for the amount of names needed, loop this function. -execute if score $dungeon do2.utility.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/add_ravager_name_to_list +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/add_ravager_name_to_list diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs.mcfunction index 9e4ad532..cd31e5cb 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs.mcfunction @@ -2,7 +2,21 @@ function do2:level_controller/save_storages function do2:level_controller/get_mob_count/count_mobs function do2:level_controller/get_mob_names/get_mob_names +scoreboard players set $dungeon do2.utility.mc.collectingLogs 1 +data modify storage do2:mobs mobCountErrors set value [] +data modify storage do2:mobs mobNameCountErrors set value [] +# For backwards compatibility +kill @e[tag=L0TRAIN] + +# L0 +kill @e[type=drowned,tag=L2WILLY] +kill @e[type=ravager,tag=L0Z1] +kill @e[type=drowned,tag=L0Z2] + +function do2:level_controller/generate_mobs/zones/l2willy +function do2:level_controller/generate_mobs/zones/l0z1 +function do2:level_controller/generate_mobs/zones/l0z2 # L1 @@ -12,11 +26,11 @@ kill @e[type=ravager,tag=L1Z3] kill @e[type=ravager,tag=L1Z4] kill @e[type=ravager,tag=L1Z5] -function do2:level_controller/generate_mobs/l1z1 -function do2:level_controller/generate_mobs/l1z2 -function do2:level_controller/generate_mobs/l1z3 -execute if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:level_controller/generate_mobs/l1z4 -execute if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:level_controller/generate_mobs/l1z5 +function do2:level_controller/generate_mobs/zones/l1z1 +function do2:level_controller/generate_mobs/zones/l1z2 +function do2:level_controller/generate_mobs/zones/l1z3 +execute if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:level_controller/generate_mobs/zones/l1z4 +execute if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:level_controller/generate_mobs/zones/l1z5 # L2 @@ -26,9 +40,35 @@ kill @e[type=ravager,tag=L2Z3] kill @e[type=ravager,tag=L2Z4] kill @e[type=ravager,tag=L2Z5] -function do2:level_controller/generate_mobs/l2z1 -function do2:level_controller/generate_mobs/l2z2 -function do2:level_controller/generate_mobs/l2z3 -execute if score $dungeon do2.config.mc.level2Zones matches 0 run function do2:level_controller/generate_mobs/l2z4 -execute if score $dungeon do2.config.mc.level2Zones matches 0 run function do2:level_controller/generate_mobs/l2z5 +function do2:level_controller/generate_mobs/zones/l2z1 +function do2:level_controller/generate_mobs/zones/l2z2 +function do2:level_controller/generate_mobs/zones/l2z3 +execute if score $dungeon do2.config.mc.level2Zones matches 0 run function do2:level_controller/generate_mobs/zones/l2z4 +execute if score $dungeon do2.config.mc.level2Zones matches 0 run function do2:level_controller/generate_mobs/zones/l2z5 + + +# L3 +kill @e[type=warden,tag=L3Z1] +kill @e[type=warden,tag=L3Z2] +kill @e[type=warden,tag=L3Z3] + +function do2:level_controller/generate_mobs/zones/l3z1 +function do2:level_controller/generate_mobs/zones/l3z2 +function do2:level_controller/generate_mobs/zones/l3z3 + +# L4 +kill @e[type=warden,tag=L4Z1] +kill @e[type=warden,tag=L4Z2] +kill @e[type=warden,tag=L4Z3] + +function do2:level_controller/generate_mobs/zones/l4z1 +function do2:level_controller/generate_mobs/zones/l4z2 +function do2:level_controller/generate_mobs/zones/l4z3 + +# Display any errors +execute store result score $dungeon do2.utility.mc.collectingLogs run data get storage do2:mobs mobCountErrors +execute if score $dungeon do2.utility.mc.collectingLogs matches 1.. run function do2:level_controller/generate_mobs/log_mob_count_errors +execute store result score $dungeon do2.utility.mc.collectingLogs run data get storage do2:mobs mobNameCountErrors +execute if score $dungeon do2.utility.mc.collectingLogs matches 1.. run function do2:level_controller/generate_mobs/log_mob_name_count_errors +scoreboard players set $dungeon do2.utility.mc.collectingLogs 0 diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_enough_ravagers.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_enough_mobs.mcfunction similarity index 70% rename from Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_enough_ravagers.mcfunction rename to Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_enough_mobs.mcfunction index 0840392e..c0277bec 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_enough_ravagers.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_enough_mobs.mcfunction @@ -1,14 +1,14 @@ # If no more mobs need to be made, return -execute if score $dungeon do2.utility.mobGeneration matches ..0 run return 0 +execute if score $dungeon do2.utility.mc.mobGenerationCount matches ..0 run return 0 -# Summon a ravager -summon minecraft:ravager -500 70 2000 {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["newly_generated_mob","mob_being_worked_on"], Health: 100f, CustomName: '{"text":"NAME-NOT-INCLUDED"}', Fire: -1s} +# Summon mob +function do2:level_controller/generate_mobs/summon_correct_mob # Count how many names are in the list. -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs mobNames +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs mobNames # Generate a random number, Min = 0, Max = Amount of names in the list -scoreboard players operation $dungeon do2.utility.randomNumberRange = $dungeon do2.utility.mobNamesCount +scoreboard players operation $dungeon do2.utility.randomNumberRange = $dungeon do2.utility.mc.mobNamesCount function do2:random_gen/generate_random_number # Remove names until do2:tests array[0] becomes the randomly chosen name. @@ -28,7 +28,7 @@ data modify storage do2:mobs mobNames set from storage do2:tests newArray # Note a mob has been generated tag @e[tag=mob_being_worked_on] remove mob_being_worked_on -scoreboard players remove $dungeon do2.utility.mobGeneration 1 +scoreboard players remove $dungeon do2.utility.mc.mobGenerationCount 1 # delete testing items execute if score $dungeon do2.tests.arrayIndex matches ..0 run data remove storage do2:tests array @@ -36,4 +36,5 @@ execute if score $dungeon do2.tests.arrayIndex matches ..0 run data remove stora scoreboard objectives remove do2.tests.arrayIndex # If more mobs need to be summoned, run this function again -execute if score $dungeon do2.utility.mobGeneration matches 1.. run function do2:level_controller/generate_mobs/generate_enough_ravagers +execute if score $dungeon do2.utility.mc.mobGenerationCount matches 1.. run function do2:level_controller/generate_mobs/generate_enough_mobs +execute if score $dungeon do2.utility.mc.mobGenerationCount matches ..0 run scoreboard players set $dungeon do2.utility.mc.mobGenerationType 0 diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z1.mcfunction deleted file mode 100644 index 1735e6f6..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z1.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l1z1 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone1 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l1z1 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z1's mob count is empty. No mobs will generate in this zone."}] -execute if score $l1z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z1 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z1's mob names for L1Z1's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z1,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add L1Z1 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z2.mcfunction deleted file mode 100644 index b454021a..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z2.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l1z2 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone2 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l1z2 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z2's mob count is empty. No mobs will generate in this zone."}] -execute if score $l1z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z2 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l1z2 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z2's mob names for L1Z2's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l1z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l1z2,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l1z2 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z3.mcfunction deleted file mode 100644 index a0fc335c..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z3.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l1z3 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone3 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l1z3 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z3's mob count is empty. No mobs will generate in this zone."}] -execute if score $l1z3 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z3 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l1z3 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z3's mob names for L1Z3's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l1z3 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l1z3,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l1z3 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z4.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z4.mcfunction deleted file mode 100644 index fc3f1384..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z4.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l1z4 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone4 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l1z4 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z4's mob count is empty. No mobs will generate in this zone."}] -execute if score $l1z4 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z4 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l1z4 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z4's mob names for L1Z4's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l1z4 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l1z4,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l1z4 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z5.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z5.mcfunction deleted file mode 100644 index 7ed1b4d5..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z5.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l1z5 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone5 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l1z5 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z5's mob count is empty. No mobs will generate in this zone."}] -execute if score $l1z5 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z5 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l1z5 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z5's mob names for L1Z5's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l1z5 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l1z5,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l1z5 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z1.mcfunction deleted file mode 100644 index 993a1ffc..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z1.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l2z1 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone1 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l2z1 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z1's mob count is empty. No mobs will generate in this zone."}] -execute if score $l2z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z1 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l2z1 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z1's mob names for L2Z1's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l2z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l2z1,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l2z1 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z2.mcfunction deleted file mode 100644 index 1383d5c0..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z2.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l2z2 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone2 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l2z2 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z2's mob count is empty. No mobs will generate in this zone."}] -execute if score $l2z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z2 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l2z2 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z2's mob names for L2Z2's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l2z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l2z2,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l2z2 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z3.mcfunction deleted file mode 100644 index 3711034e..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z3.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l2z3 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone3 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l2z3 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z3's mob count is empty. No mobs will generate in this zone."}] -execute if score $l2z3 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z3 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l2z3 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z3's mob names for L2Z3's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l2z3 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l2z3,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l2z3 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z4.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z4.mcfunction deleted file mode 100644 index 96e224ca..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z4.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l2z4 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone4 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l2z4 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z4's mob count is empty. No mobs will generate in this zone."}] -execute if score $l2z4 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z4 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l2z4 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z4's mob names for L2Z4's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l2z4 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l2z4,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l2z4 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z5.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z5.mcfunction deleted file mode 100644 index e9f895b2..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z5.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -# Setup -execute store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 -scoreboard players operation $dungeon do2.utility.mobGeneration = $l2z5 do2.config.mc.levelZoneMobCount -data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone5 - -# - Check for issues - -# Check for mob AMOUNT count -execute if score $l2z5 do2.config.mc.levelZoneMobCount matches ..0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z5's mob count is empty. No mobs will generate in this zone."}] -execute if score $l2z5 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z5 do2.config.mc.levelZoneMobCount 0 -# Check for sufficient mob NAMES -execute if score $dungeon do2.utility.mobNamesCount < $l2z5 do2.config.mc.levelZoneMobCount as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z5's mob names for L2Z5's mob count. Adding random names to fix."}] -execute if score $dungeon do2.utility.mobNamesCount < $l2z5 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names - - -# Generate enough ravagers. -function do2:level_controller/generate_mobs/generate_enough_ravagers - -# Finish -execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=l2z5,limit=1,sort=random] -execute as @e[tag=newly_generated_mob] run tag @s add l2z5 -execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/log_mob_count_errors.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/log_mob_count_errors.mcfunction new file mode 100644 index 00000000..6778fe71 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/log_mob_count_errors.mcfunction @@ -0,0 +1,13 @@ +execute store result score $dungeon do2.utility.mc.collectingLogs run data get storage do2:mobs mobCountErrors +execute if score $dungeon do2.utility.mc.collectingLogs matches ..0 run return 0 +execute if score $dungeon do2.utility.mc.collectingLogs matches 1 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: "},{"storage": "do2:mobs","nbt": "mobCountErrors[0]"},{"text":"'s mob count is empty. No mobs will generate in this zone."}] +execute if score $dungeon do2.utility.mc.collectingLogs matches 1 run return 0 + +# there is no fricken way to DISPLAY do2:mobs mergedErrors in a "READABLE" format. +# Sure I can have it display it in JSON form, but no user wants to see that. +# Screw us being stuck in 1.20.1, the very NEXT version 1.20.2 SOLVED this issue. +# I've spent THREE days trying to come up with a solution that can display all 1,048,574 possible combinations. +# In the end I gave up -.- +# - Sincerely a VERY frustrated programmer. +execute as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Multiple zones' mob count is empty. No mobs will generate in "},{"score":{"name":"$dungeon","objective":"do2.utility.mc.collectingLogs"},"color":"aqua"},{"text":"§r zones. ("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"storage": "do2:mobs","nbt": "mobCountErrors"}]}},{"text":")"}] + diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/log_mob_name_count_errors.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/log_mob_name_count_errors.mcfunction new file mode 100644 index 00000000..448cdbef --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/log_mob_name_count_errors.mcfunction @@ -0,0 +1,8 @@ +execute store result score $dungeon do2.utility.mc.collectingLogs run data get storage do2:mobs mobNameCountErrors +execute if score $dungeon do2.utility.mc.collectingLogs matches ..0 run return 0 +execute if score $dungeon do2.utility.mc.collectingLogs matches 1 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: "},{"storage": "do2:mobs","nbt": "mobCountErrors[0]"},{"text":"'s mob name count is empty. Mobs' names will be randomly generated in this zone."}] +execute if score $dungeon do2.utility.mc.collectingLogs matches 1 run return 0 + +# Check log_mob_count_errors for comment. +execute as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Multiple zones' mob names count is empty. Will add randomly generated names in "},{"score":{"name":"$dungeon","objective":"do2.utility.mc.collectingLogs"},"color":"aqua"},{"text":"§r zones. ("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"storage": "do2:mobs","nbt": "mobCountErrors"}]}},{"text":")"}] + diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/merge_errors.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/merge_errors.mcfunction new file mode 100644 index 00000000..108048a4 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/merge_errors.mcfunction @@ -0,0 +1,14 @@ +execute unless data storage do2:mobs mergedErrors[1] run return 0 + +# Idea, place a sign down, copy the text over, then copy that text into a entity, and then finally save the text from the entity +# Summon a text_display entity, to convert data into raw text, to store the raw text as a mob name. + +# TODO: does not work. +summon minecraft:text_display -508 123 1956 {Tags:["MergeTextHelper"],text:'[{"storage": "do2:mobs","nbt": "mergedErrors[0]"},{"text":"\\n"},{"storage": "do2:mobs","nbt": "mergedErrors[1]"}]'} +data remove storage do2:mobs mergedErrors[1] +data remove storage do2:mobs mergedErrors[0] +data modify storage do2:mobs mergedErrors prepend from + +kill @e[type=minecraft:text_display,tag=MergeTextHelper] + +function do2:level_controller/generate_mobs/merge_errors diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/summon_correct_mob.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/summon_correct_mob.mcfunction new file mode 100644 index 00000000..5655b50c --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/summon_correct_mob.mcfunction @@ -0,0 +1,9 @@ +# Invalid Score +execute if score $dungeon do2.utility.mc.mobGenerationType matches 0 run return 0 +# Ravagers +execute if score $dungeon do2.utility.mc.mobGenerationType matches 1 run summon minecraft:ravager -500 70 2000 {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["newly_generated_mob","mob_being_worked_on"], Health: 100f, CustomName: '{"text":"NAME-NOT-INCLUDED"}', Fire: -1s} +# Wardens +execute if score $dungeon do2.utility.mc.mobGenerationType matches 2 run summon minecraft:warden -500 70 2000 {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["newly_generated_mob","mob_being_worked_on"], Health: 500f, CustomName: '{"text":"NAME-NOT-INCLUDED"}', Fire: -1s, Brain : { memories : { "minecraft:dig_cooldown" : { value : {}, ttl : 1000000L } } }} +# Drowned +execute if score $dungeon do2.utility.mc.mobGenerationType matches 3 run summon minecraft:drowned -500 70 2000 {PersistenceRequired:1b, Invulnerable: 1b, Tags: ["newly_generated_mob","mob_being_worked_on"], Health: 20f, CustomName: '{"text":"NAME-NOT-INCLUDED"}', Fire: -1s, HandDropChances: [0.0f, 0.0f], Health: 20.0f, HandItems: [{id: "minecraft:trident", Count: 1b}, {}]} + diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l0z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l0z1.mcfunction new file mode 100644 index 00000000..36e2392c --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l0z1.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level0_zone1 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l0z1 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level0_zone1 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l0z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L0Z1' +execute if score $l0z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L0Z1's mob count is empty. No mobs will generate in this zone."}] +execute if score $l0z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l0z1 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l0z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L0Z1' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l0z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L0Z1's mob names for L0Z1's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l0z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L0Z1,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L0Z1 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l0z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l0z2.mcfunction new file mode 100644 index 00000000..2e149d4d --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l0z2.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level0_zone2 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l0z2 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level0_zone2 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l0z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L0Z2' +execute if score $l0z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L0Z2's mob count is empty. No mobs will generate in this zone."}] +execute if score $l0z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l0z2 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l0z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L0Z2' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l0z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L0Z2's mob names for L0Z2's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l0z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/drowned_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 3 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L0Z2,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L0Z2 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z1.mcfunction new file mode 100644 index 00000000..22eccfa4 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z1.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level1_zone1 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l1z1 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone1 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l1z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L1Z1' +execute if score $l1z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z1's mob count is empty. No mobs will generate in this zone."}] +execute if score $l1z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z1 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L1Z1' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z1's mob names for L1Z1's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z1,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L1Z1 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z2.mcfunction new file mode 100644 index 00000000..0fcd4e70 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z2.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level1_zone2 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l1z2 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone2 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l1z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L1Z2' +execute if score $l1z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z2's mob count is empty. No mobs will generate in this zone."}] +execute if score $l1z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z2 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L1Z2' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z2's mob names for L1Z2's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z2,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L1Z2 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z3.mcfunction new file mode 100644 index 00000000..d02137bc --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z3.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level1_zone3 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l1z3 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone3 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l1z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L1Z3' +execute if score $l1z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z3's mob count is empty. No mobs will generate in this zone."}] +execute if score $l1z3 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z3 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L1Z3' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z3's mob names for L1Z3's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z3 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z3,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L1Z3 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z4.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z4.mcfunction new file mode 100644 index 00000000..d1d09e41 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z4.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level1_zone4 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l1z4 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone4 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l1z4 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L1Z4' +execute if score $l1z4 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z4's mob count is empty. No mobs will generate in this zone."}] +execute if score $l1z4 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z4 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z4 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L1Z4' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z4 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z4's mob names for L1Z4's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z4 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z4,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L1Z4 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z5.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z5.mcfunction new file mode 100644 index 00000000..6cfce07a --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l1z5.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level1_zone5 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l1z5 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level1_zone5 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l1z5 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L1Z5' +execute if score $l1z5 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z5's mob count is empty. No mobs will generate in this zone."}] +execute if score $l1z5 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l1z5 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z5 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L1Z5' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z5 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L1Z5's mob names for L1Z5's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l1z5 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z5,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L1Z5 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2willy.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2willy.mcfunction new file mode 100644 index 00000000..ab9daa45 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2willy.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level2_willy +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l2willy do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level2_willy + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l2willy do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L2WILLY' +execute if score $l2willy do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2WILLY's mob count is empty. No mobs will generate in this zone."}] +execute if score $l2willy do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2willy do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2willy do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L2WILLY' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2willy do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2WILLY's mob names for L2WILLY's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2willy do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/drowned_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 3 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L2WILLY,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L2WILLY +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z1.mcfunction new file mode 100644 index 00000000..5aa099fa --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z1.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level2_zone1 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l2z1 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone1 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l2z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L2Z1' +execute if score $l2z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z1's mob count is empty. No mobs will generate in this zone."}] +execute if score $l2z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z1 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L2Z1' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z1's mob names for L2Z1's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L2Z1,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L2Z1 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z2.mcfunction new file mode 100644 index 00000000..5ed3f02a --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z2.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level2_zone2 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l2z2 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone2 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l2z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L2Z2' +execute if score $l2z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z2's mob count is empty. No mobs will generate in this zone."}] +execute if score $l2z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z2 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L2Z2' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z2's mob names for L2Z2's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L2Z2,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L2Z2 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z3.mcfunction new file mode 100644 index 00000000..8c4abb44 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z3.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level2_zone3 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l2z3 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone3 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l2z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L2Z3' +execute if score $l2z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z3's mob count is empty. No mobs will generate in this zone."}] +execute if score $l2z3 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z3 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L2Z3' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z3's mob names for L2Z3's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z3 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L2Z3,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L2Z3 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z4.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z4.mcfunction new file mode 100644 index 00000000..786a40e6 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z4.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level2_zone4 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l2z4 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone4 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l2z4 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L2Z4' +execute if score $l2z4 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z4's mob count is empty. No mobs will generate in this zone."}] +execute if score $l2z4 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z4 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z4 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L2Z4' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z4 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z4's mob names for L2Z4's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z4 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L2Z4,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L2Z4 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z5.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z5.mcfunction new file mode 100644 index 00000000..e0641891 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l2z5.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level2_zone5 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l2z5 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level2_zone5 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l2z5 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L2Z5' +execute if score $l2z5 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z5's mob count is empty. No mobs will generate in this zone."}] +execute if score $l2z5 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l2z5 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z5 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L2Z5' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z5 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L2Z5's mob names for L2Z5's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l2z5 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/ravager_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 1 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L2Z5,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L2Z5 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z1.mcfunction new file mode 100644 index 00000000..d4b47da3 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z1.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level3_zone1 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l3z1 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level3_zone1 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l3z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L3Z1' +execute if score $l3z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L3Z1's mob count is empty. No mobs will generate in this zone."}] +execute if score $l3z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l3z1 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L3Z1' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L3Z1's mob names for L3Z1's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/warden_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 2 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L3Z1,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L3Z1 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z2.mcfunction new file mode 100644 index 00000000..387d5134 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z2.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level3_zone2 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l3z2 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level3_zone2 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l3z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L3Z2' +execute if score $l3z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L3Z2's mob count is empty. No mobs will generate in this zone."}] +execute if score $l3z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l3z2 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L3Z2' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L3Z2's mob names for L3Z2's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/warden_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 2 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L3Z2,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L3Z2 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z3.mcfunction new file mode 100644 index 00000000..5cf00e50 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l3z3.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level3_zone3 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l3z3 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level3_zone3 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l3z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L3Z3' +execute if score $l3z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L3Z3's mob count is empty. No mobs will generate in this zone."}] +execute if score $l3z3 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l3z3 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L3Z3' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L3Z3's mob names for L3Z3's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l3z3 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/warden_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 2 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L3Z3,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L3Z3 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z1.mcfunction new file mode 100644 index 00000000..5e19c1da --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z1.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level4_zone1 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l4z1 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level4_zone1 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l4z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L4Z1' +execute if score $l4z1 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L4Z1's mob count is empty. No mobs will generate in this zone."}] +execute if score $l4z1 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l4z1 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L4Z1' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z1 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L4Z1's mob names for L4Z1's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z1 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/warden_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 2 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L4Z1,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L4Z1 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z2.mcfunction new file mode 100644 index 00000000..f2cdb69b --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z2.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level4_zone2 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l4z2 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level4_zone2 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l4z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L4Z2' +execute if score $l4z2 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L4Z2's mob count is empty. No mobs will generate in this zone."}] +execute if score $l4z2 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l4z2 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L4Z2' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z2 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L4Z2's mob names for L4Z2's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z2 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/warden_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 2 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L4Z2,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L4Z2 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z3.mcfunction new file mode 100644 index 00000000..c5812b17 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/zones/l4z3.mcfunction @@ -0,0 +1,23 @@ +# Setup +execute store result score $dungeon do2.utility.mc.mobNamesCount run data get storage do2:mobs level4_zone3 +scoreboard players operation $dungeon do2.utility.mc.mobGenerationCount = $l4z3 do2.config.mc.levelZoneMobCount +data modify storage do2:mobs mobNames set from storage do2:mobs level4_zone3 + +# - Check for issues - +# Check for mob AMOUNT count +execute if score $l4z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobCountErrors append value 'L4Z3' +execute if score $l4z3 do2.config.mc.levelZoneMobCount matches ..0 if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L4Z3's mob count is empty. No mobs will generate in this zone."}] +execute if score $l4z3 do2.config.mc.levelZoneMobCount matches ..0 run scoreboard players set $l4z3 do2.config.mc.levelZoneMobCount 0 +# Check for sufficient mob NAMES +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 1 run data modify storage do2:mobs mobNameCountErrors append value 'L4Z3' +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z3 do2.config.mc.levelZoneMobCount if score $dungeon do2.utility.mc.collectingLogs matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Not enough L4Z3's mob names for L4Z3's mob count. Adding random names to fix."}] +execute if score $dungeon do2.utility.mc.mobNamesCount < $l4z3 do2.config.mc.levelZoneMobCount run function do2:level_controller/add_mob_names/warden_names + +# Generate enough mobs. +scoreboard players set $dungeon do2.utility.mc.mobGenerationType 2 +function do2:level_controller/generate_mobs/generate_enough_mobs + +# Finish +execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L4Z3,limit=1,sort=random] +execute as @e[tag=newly_generated_mob] run tag @s add L4Z3 +execute as @e[tag=newly_generated_mob] run tag @s remove newly_generated_mob \ No newline at end of file diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/backrooms.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/backrooms.mcfunction new file mode 100644 index 00000000..0096e502 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/backrooms.mcfunction @@ -0,0 +1,6 @@ +execute positioned -523 122 1946 run function do2:level_controller/get_mob_count/count_inside_barrel +scoreboard players operation $l0z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal +execute positioned -523 122 1945 run function do2:level_controller/get_mob_count/count_inside_barrel +scoreboard players operation $l0z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal +execute positioned -523 122 1943 run function do2:level_controller/get_mob_count/count_inside_barrel +scoreboard players operation $l2willy do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_inside_barrel.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_inside_barrel.mcfunction index 0a72cb03..55d8cb17 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_inside_barrel.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_inside_barrel.mcfunction @@ -1,60 +1,60 @@ -scoreboard players set $dungeon do2.utility.mobCountCounterTotal 0 +scoreboard players set $dungeon do2.utility.mc.mobCountCounterTotal 0 # Count each slot -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[0].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[1].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[2].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[3].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[4].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[5].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[6].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[7].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[8].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[9].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[10].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[11].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[12].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[13].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[14].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[15].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[16].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[17].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[18].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[19].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[20].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[21].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[22].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[23].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[24].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[25].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest -execute store result score $dungeon do2.utility.mobCountCounterTest run data get block ~ ~ ~ Items[26].Count -scoreboard players operation $dungeon do2.utility.mobCountCounterTotal += $dungeon do2.utility.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[0].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[1].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[2].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[3].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[4].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[5].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[6].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[7].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[8].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[9].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[10].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[11].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[12].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[13].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[14].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[15].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[16].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[17].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[18].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[19].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[20].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[21].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[22].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[23].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[24].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[25].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest +execute store result score $dungeon do2.utility.mc.mobCountCounterTest run data get block ~ ~ ~ Items[26].Count +scoreboard players operation $dungeon do2.utility.mc.mobCountCounterTotal += $dungeon do2.utility.mc.mobCountCounterTest diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_mobs.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_mobs.mcfunction index 36ad96ce..36fe8535 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_mobs.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_mobs.mcfunction @@ -1,2 +1,5 @@ function do2:level_controller/get_mob_count/l1 function do2:level_controller/get_mob_count/l2 +function do2:level_controller/get_mob_count/l3 +function do2:level_controller/get_mob_count/l4 +function do2:level_controller/get_mob_count/backrooms diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l1.mcfunction index 604f391d..77302e9a 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l1.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l1.mcfunction @@ -1,21 +1,21 @@ # - WITH ZONES - execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 122 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players operation $l1z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players operation $l1z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 122 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players operation $l1z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players operation $l1z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 122 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players operation $l1z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players operation $l1z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players set $l1z4 do2.config.mc.levelZoneMobCount 0 execute if score $dungeon do2.config.mc.level1Zones matches 1 run scoreboard players set $l1z5 do2.config.mc.levelZoneMobCount 0 # - WITHOUT ZONES - execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 125 1946 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 125 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 125 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 125 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z4 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z4 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 125 1942 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z5 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level1Zones matches 0 run scoreboard players operation $l1z5 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l2.mcfunction index 2fe67122..6158b3c9 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l2.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l2.mcfunction @@ -1,21 +1,21 @@ # - WITH ZONES - execute if score $dungeon do2.config.mc.level2Zones matches 1 positioned -525 122 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players operation $l2z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players operation $l2z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 1 positioned -525 122 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players operation $l2z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players operation $l2z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 1 positioned -525 122 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players operation $l2z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players operation $l2z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players set $l2z4 do2.config.mc.levelZoneMobCount 0 execute if score $dungeon do2.config.mc.level2Zones matches 1 run scoreboard players set $l2z5 do2.config.mc.levelZoneMobCount 0 # - WITHOUT ZONES - execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 125 1946 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 125 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 125 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 125 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z4 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z4 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 125 1942 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z5 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level2Zones matches 0 run scoreboard players operation $l2z5 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l3.mcfunction index c447a39c..158f7b9e 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l3.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l3.mcfunction @@ -1,6 +1,6 @@ execute positioned -523 122 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -scoreboard players operation $l3z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +scoreboard players operation $l3z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute positioned -523 122 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -scoreboard players operation $l3z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +scoreboard players operation $l3z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute positioned -523 122 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -scoreboard players operation $l3z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +scoreboard players operation $l3z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l4.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l4.mcfunction index 6b9620cc..529dc13a 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l4.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l4.mcfunction @@ -1,15 +1,15 @@ # - WITH ZONES - execute if score $dungeon do2.config.mc.level4Zones matches 1 positioned -521 122 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level4Zones matches 1 run scoreboard players operation $l4z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level4Zones matches 1 run scoreboard players operation $l4z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level4Zones matches 1 positioned -521 122 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level4Zones matches 1 run scoreboard players operation $l4z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level4Zones matches 1 run scoreboard players operation $l4z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level4Zones matches 1 positioned -521 122 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level4Zones matches 1 run scoreboard players operation $l4z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level4Zones matches 1 run scoreboard players operation $l4z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal # - WITHOUT ZONES - execute if score $dungeon do2.config.mc.level4Zones matches 0 positioned -521 125 1945 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level4Zones matches 0 run scoreboard players operation $l4z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level4Zones matches 0 run scoreboard players operation $l4z1 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level4Zones matches 0 positioned -521 125 1944 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level4Zones matches 0 run scoreboard players operation $l4z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level4Zones matches 0 run scoreboard players operation $l4z2 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal execute if score $dungeon do2.config.mc.level4Zones matches 0 positioned -521 125 1943 run function do2:level_controller/get_mob_count/count_inside_barrel -execute if score $dungeon do2.config.mc.level4Zones matches 0 run scoreboard players operation $l4z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mobCountCounterTotal +execute if score $dungeon do2.config.mc.level4Zones matches 0 run scoreboard players operation $l4z3 do2.config.mc.levelZoneMobCount = $dungeon do2.utility.mc.mobCountCounterTotal diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/backrooms.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/backrooms.mcfunction new file mode 100644 index 00000000..2850bf66 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/backrooms.mcfunction @@ -0,0 +1,6 @@ +execute positioned -519 123 1946 run function do2:level_controller/get_mob_names/get_names_from_shulker +data modify storage do2:mobs level0_zone1 set from storage do2:mobs temp +execute positioned -519 123 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker +data modify storage do2:mobs level0_zone2 set from storage do2:mobs temp +execute positioned -519 123 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker +data modify storage do2:mobs level2_willy set from storage do2:mobs temp diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_mob_names.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_mob_names.mcfunction index b029b370..9a72bb8f 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_mob_names.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_mob_names.mcfunction @@ -2,3 +2,4 @@ function do2:level_controller/get_mob_names/l1 function do2:level_controller/get_mob_names/l2 function do2:level_controller/get_mob_names/l3 function do2:level_controller/get_mob_names/l4 +function do2:level_controller/get_mob_names/backrooms diff --git a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/backrooms.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/backrooms.mcfunction index 2bc4c10b..a278303a 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/backrooms.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/backrooms.mcfunction @@ -1,9 +1,9 @@ # Mob Amount -data merge block -529 114 1946 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:94,display:{Name:'{"text":"Ravager","italic":false}'}}}]} +data merge block -529 114 1946 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Ravager","italic":false}'}}}]} data merge block -529 114 1945 {Items:[{Slot:0b, id: "minecraft:player_head", Count: 1b, tag: {display: {Name: '{"text":"Drowned","italic":false}'}, SkullOwner: {Properties: {textures: [{Value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzNmN2NjZjYxZGJjM2Y5ZmU5YTYzMzNjZGUwYzBlMTQzOTllYjJlZWE3MWQzNGNmMjIzYjNhY2UyMjA1MSJ9fX0="}]}, Id: [I; 790009440, 1639859901, -1397417282, -100772047], Name: "Drowned"}}}]} data merge block -529 114 1943 {Items:[{Slot:0b, id: "minecraft:player_head", Count: 1b, tag: {display: {Name: '{"text":"Drowned","italic":false}'}, SkullOwner: {Properties: {textures: [{Value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzNmN2NjZjYxZGJjM2Y5ZmU5YTYzMzNjZGUwYzBlMTQzOTllYjJlZWE3MWQzNGNmMjIzYjNhY2UyMjA1MSJ9fX0="}]}, Id: [I; 790009440, 1639859901, -1397417282, -100772047], Name: "Drowned"}}}]} # Mob Names -data merge block -529 115 1946 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:94,display:{Name:'{"text":"Jellie"}'}}}]} +data merge block -529 115 1946 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Jellie"}'}}}]} data merge block -529 115 1945 {Items:[{Slot:0b, id: "minecraft:player_head", Count: 1b, tag: {display: {Name: '{"text":"The Worst!!!"}'}, SkullOwner: {Properties: {textures: [{Value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzNmN2NjZjYxZGJjM2Y5ZmU5YTYzMzNjZGUwYzBlMTQzOTllYjJlZWE3MWQzNGNmMjIzYjNhY2UyMjA1MSJ9fX0="}]}, Id: [I; 790009440, 1639859901, -1397417282, -100772047], Name: "Drowned"}}}]} data merge block -529 115 1943 {Items:[{Slot:0b, id: "minecraft:player_head", Count: 1b, tag: {display: {Name: '{"text":"One Eyed Willy"}'}, SkullOwner: {Properties: {textures: [{Value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzNmN2NjZjYxZGJjM2Y5ZmU5YTYzMzNjZGUwYzBlMTQzOTllYjJlZWE3MWQzNGNmMjIzYjNhY2UyMjA1MSJ9fX0="}]}, Id: [I; 790009440, 1639859901, -1397417282, -100772047], Name: "Drowned"}}}]} diff --git a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/l3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/l3.mcfunction index 05170c82..228ef179 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/l3.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/individual/l3.mcfunction @@ -1,9 +1,9 @@ # Warden Amount -data merge block -529 114 1945 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Warden","italic":false}'}}}]} -data merge block -529 114 1944 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Warden","italic":false}'}}}]} -data merge block -529 114 1943 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Warden","italic":false}'}}}]} +data merge block -529 114 1945 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:91,display:{Name:'{"text":"Warden","italic":false}'}}}]} +data merge block -529 114 1944 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:91,display:{Name:'{"text":"Warden","italic":false}'}}}]} +data merge block -529 114 1943 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:91,display:{Name:'{"text":"Warden","italic":false}'}}}]} # Warden Names -data merge block -529 115 1945 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Pain"}'}}}]} -data merge block -529 115 1944 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Panic"}'}}}]} -data merge block -529 115 1943 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:96,display:{Name:'{"text":"Pancakes"}'}}}]} +data merge block -529 115 1945 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:91,display:{Name:'{"text":"Pain"}'}}}]} +data merge block -529 115 1944 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:91,display:{Name:'{"text":"Panic"}'}}}]} +data merge block -529 115 1943 {Items:[{Slot:0b, id:"minecraft:carved_pumpkin", Count:1b, tag:{CustomModelData:91,display:{Name:'{"text":"Pancakes"}'}}}]} diff --git a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_all.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_all.mcfunction index 26eaa773..0127308a 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_all.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_all.mcfunction @@ -6,6 +6,9 @@ particle minecraft:explosion -528 116 1944 0 1 -2 0 30 force place template do2:config.mc.storages_default -527 122 1942 none none 1 0 # Reset CURRENT storage +# L0 +execute if score $dungeon do2.config.mc.levelEditing matches 0 run function do2:level_controller/reset_to_default/individual/backrooms + # L1 execute if score $dungeon do2.config.mc.levelEditing matches 1 if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:level_controller/reset_to_default/individual/l1_no_zones execute if score $dungeon do2.config.mc.levelEditing matches 1 if score $dungeon do2.config.mc.level1Zones matches 1 run function do2:level_controller/reset_to_default/individual/l1_zones @@ -19,5 +22,3 @@ execute if score $dungeon do2.config.mc.levelEditing matches 3 run function do2: # L4 execute if score $dungeon do2.config.mc.levelEditing matches 4 run function do2:level_controller/reset_to_default/individual/l4 -# L5 -execute if score $dungeon do2.config.mc.levelEditing matches 5 run function do2:level_controller/reset_to_default/individual/backrooms diff --git a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_current.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_current.mcfunction index 1846505d..2d2538b8 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_current.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/reset_to_default/reset_current.mcfunction @@ -1,5 +1,9 @@ playsound minecraft:block.amethyst_cluster.place player @a -526 115 1944 1 0.5 0 particle minecraft:cloud -528 116 1944 0 1 2 0 1000 force + +# L0 +execute if score $dungeon do2.config.mc.levelEditing matches 0 run function do2:level_controller/reset_to_default/individual/backrooms + # L1 execute if score $dungeon do2.config.mc.levelEditing matches 1 if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:level_controller/reset_to_default/individual/l1_no_zones execute if score $dungeon do2.config.mc.levelEditing matches 1 if score $dungeon do2.config.mc.level1Zones matches 1 run function do2:level_controller/reset_to_default/individual/l1_zones @@ -12,6 +16,3 @@ execute if score $dungeon do2.config.mc.levelEditing matches 3 run function do2: # L4 execute if score $dungeon do2.config.mc.levelEditing matches 4 run function do2:level_controller/reset_to_default/individual/l4 - -# L5 -execute if score $dungeon do2.config.mc.levelEditing matches 5 run function do2:level_controller/reset_to_default/individual/backrooms diff --git a/Brilliance Datapack/data/do2/functions/level_controller/run_per_tick.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/run_per_tick.mcfunction index a20f8c60..2a2153f6 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/run_per_tick.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/run_per_tick.mcfunction @@ -15,11 +15,11 @@ execute if block -518 115 1940 minecraft:bamboo_button[powered=true] run functio execute if block -517 115 1940 minecraft:bamboo_button[powered=true] run function do2:level_controller/swap_to/backrooms # Run the per ticks +execute if score $dungeon do2.config.mc.levelEditing matches 0 run function do2:level_controller/per_tick/backrooms execute if score $dungeon do2.config.mc.levelEditing matches 1 run function do2:level_controller/per_tick/l1 execute if score $dungeon do2.config.mc.levelEditing matches 2 run function do2:level_controller/per_tick/l2 execute if score $dungeon do2.config.mc.levelEditing matches 3 run function do2:level_controller/per_tick/l3 execute if score $dungeon do2.config.mc.levelEditing matches 4 run function do2:level_controller/per_tick/l4 -execute if score $dungeon do2.config.mc.levelEditing matches 5 run function do2:level_controller/per_tick/backrooms # Make sure all players have at least 1 level, in order to name things at the anvil execute positioned -516 114 1947 as @a[distance=..6] store result score @s do2.utility.playersExperience run experience query @s levels diff --git a/Brilliance Datapack/data/do2/functions/level_controller/save_storages.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/save_storages.mcfunction index e4f44b3a..f7b59574 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/save_storages.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/save_storages.mcfunction @@ -1,3 +1,6 @@ +# Level 0 +execute if score $dungeon do2.config.mc.levelEditing matches 0 run clone -529 114 1946 -529 115 1942 -519 122 1942 + # Level 1 execute if score $dungeon do2.config.mc.levelEditing matches 1 if score $dungeon do2.config.mc.level1Zones matches 1 run clone -529 114 1946 -529 115 1942 -527 122 1942 execute if score $dungeon do2.config.mc.levelEditing matches 1 if score $dungeon do2.config.mc.level1Zones matches 0 run clone -529 114 1946 -529 115 1942 -527 125 1942 @@ -12,6 +15,3 @@ execute if score $dungeon do2.config.mc.levelEditing matches 3 run clone -529 11 # Level 4 execute if score $dungeon do2.config.mc.levelEditing matches 4 if score $dungeon do2.config.mc.level4Zones matches 1 run clone -529 114 1946 -529 115 1942 -521 122 1942 execute if score $dungeon do2.config.mc.levelEditing matches 4 if score $dungeon do2.config.mc.level4Zones matches 0 run clone -529 114 1946 -529 115 1942 -521 125 1942 - -# Level 5 -execute if score $dungeon do2.config.mc.levelEditing matches 5 run clone -529 114 1946 -529 115 1942 -519 122 1942 diff --git a/Brilliance Datapack/data/do2/functions/level_controller/swap_to/backrooms.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/swap_to/backrooms.mcfunction index 37ceb5da..bc58d607 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/swap_to/backrooms.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/swap_to/backrooms.mcfunction @@ -2,7 +2,7 @@ fill -521 115 1940 -517 115 1940 minecraft:bamboo_button[powered=false,facing=south] fill -521 116 1939 -517 116 1939 minecraft:redstone_lamp[lit=false] setblock -517 116 1939 minecraft:redstone_lamp[lit=true] -scoreboard players set $dungeon do2.config.mc.levelEditing 5 +scoreboard players set $dungeon do2.config.mc.levelEditing 0 fill -525 115 1944 -525 116 1944 air replace fill -528 118 1946 -528 116 1942 air replace diff --git a/Brilliance Datapack/data/do2/functions/scoreboard/config/config_setup.mcfunction b/Brilliance Datapack/data/do2/functions/scoreboard/config/config_setup.mcfunction index 4558c7a8..9f1daf22 100644 --- a/Brilliance Datapack/data/do2/functions/scoreboard/config/config_setup.mcfunction +++ b/Brilliance Datapack/data/do2/functions/scoreboard/config/config_setup.mcfunction @@ -42,7 +42,7 @@ function do2:scoreboard/config/boolean_levers/bats_distraction/sign # ==================== # Reset Selected to Default setblock -522 115 1950 minecraft:warped_wall_sign[facing=east] -data merge block -522 115 1950 {front_text:{messages:['{"text":"","color":"black"}','{"text":"§b§oReset selected"}','{"text":"to defaults"}','{"text":""}','{"text":"§9§o§n( CLICK ME )","clickEvent":{"action":"run_command","value":"function do2:level_controller/reset_to_default/reset_current"}}']}} +data merge block -522 115 1950 {front_text:{messages:['{"text":"§b§oReset selected"}','{"text":"§b§oto defaults"}','{"text":""}','{"text":"§9§o§n( CLICK ME )","clickEvent":{"action":"run_command","value":"function do2:level_controller/reset_to_default/reset_current"}}']}} # Reset All to Default setblock -522 115 1951 minecraft:warped_wall_sign[facing=east] -data merge block -522 115 1950 {front_text:{messages:['{"text":"","color":"black"}','{"text":"§b§oReset all"}','{"text":"to defaults"}','{"text":""}','{"text":"§9§o§n( CLICK ME )","clickEvent":{"action":"run_command","value":"function do2:level_controller/reset_to_default/reset_all"}}']}} +data merge block -522 115 1951 {front_text:{messages:['{"text":"§b§oReset all"}','{"text":"§b§oto defaults"}','{"text":""}','{"text":"§9§o§n( CLICK ME )","clickEvent":{"action":"run_command","value":"function do2:level_controller/reset_to_default/reset_all"}}']}} diff --git a/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction b/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction index aaf5798a..0e01413f 100644 --- a/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction +++ b/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction @@ -20,24 +20,27 @@ scoreboard objectives add do2.utility.old_position.temp dummy "Player's old loca scoreboard objectives add do2.utility.floorEmbers dummy "Used to get the player's floor ember" scoreboard objectives add do2.utility.totalCrowns dummy "Counts player's crowns & coins" scoreboard objectives add do2.utility.coinsPerCrown dummy "for scoreboard operations" -scoreboard objectives add do2.utility.shouldForceFood dummy "Boolean on whether game is wants to force the player's food at the moment." -scoreboard objectives add do2.utility.playersFood food "Check player's food levels" -scoreboard objectives add do2.utility.playersSaturation dummy "Check player's saturation levels" execute unless score $dungeon do2.utility.coinsPerCrown matches 0.. run scoreboard players set $dungeon do2.utility.coinsPerCrown 4 +scoreboard objectives add do2.utility.shouldForceFood dummy "Boolean on whether game is forcing current player's food at the moment." +scoreboard objectives add do2.utility.playersFood food "Tracking player's food levels" +scoreboard objectives add do2.utility.playersSaturation dummy "Tracking player's saturation levels" scoreboard objectives add do2.run.artifactValue dummy "How many embers the artifact was worth." scoreboard objectives add do2.utility.statsScreen dummy "What screen the stats are showing right now" execute unless score $dungeon do2.utility.statsScreen matches 0.. run scoreboard players set $dungeon do2.utility.statsScreen 0 scoreboard objectives add do2.utility.priceChecker dummy "Used to count the price of cards in shops" scoreboard objectives add do2.utility.receivedJackpot dummy "Used to count the keys in loot boxes to see if Jackpot was won" -scoreboard objectives add do2.utility.mobCountCounterTest dummy "Used to count the how many mobs are in a barrel" -scoreboard objectives add do2.utility.mobCountCounterTotal dummy "Used to count the how many mobs are in a barrel" -scoreboard objectives add do2.utility.mobGeneration dummy "Used to count how many mobs to generate" -scoreboard objectives add do2.utility.mobNamesCount dummy "Used to count how many mobs names exist." scoreboard objectives add do2.utility.playersExperience dummy "Used to count how much experience players have." - scoreboard objectives add do2.utility.onServer dummy "Checking if this Brilliance is loaded on the server" execute unless score $dungeon do2.utility.onServer matches 0.. run scoreboard players set $dungeon do2.utility.onServer 0 +# - Mob Controller - (level_controller) +scoreboard objectives add do2.utility.mc.mobCountCounterTest dummy "Used to count the how many mobs are in a barrel" +scoreboard objectives add do2.utility.mc.mobCountCounterTotal dummy "Used to count the how many mobs are in a barrel" +scoreboard objectives add do2.utility.mc.mobGenerationCount dummy "Used to count how many mobs to generate" +scoreboard objectives add do2.utility.mc.mobGenerationType dummy "Used to tell which mob is being generated." +scoreboard objectives add do2.utility.mc.mobNamesCount dummy "Used to count how many mobs names exist." +scoreboard objectives add do2.utility.mc.collectingLogs dummy "Boolean if collecting warnings from mob controller in order to group them up." + # - Cycle Items utility - scoreboard objectives add do2.utility.embersToGive dummy "§3Frost Embers§r left to give" diff --git a/Brilliance Datapack/data/do2/functions/version.mcfunction b/Brilliance Datapack/data/do2/functions/version.mcfunction index bb2a7c10..fa8a62db 100644 --- a/Brilliance Datapack/data/do2/functions/version.mcfunction +++ b/Brilliance Datapack/data/do2/functions/version.mcfunction @@ -1,3 +1,3 @@ -# DATAPACK VERSION NUMBER: 0.12.34 +# DATAPACK VERSION NUMBER: 0.13.0 -tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.12.34§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}] +tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.13.0§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]