From 35e2196c5b5a410689fd8baee8d2a3dc635a88d2 Mon Sep 17 00:00:00 2001 From: FrustratedProgrammer Date: Fri, 12 Jul 2024 19:35:43 -0600 Subject: [PATCH] Levels 1 & 2 now use the new mob controller. --- .../functions/dungeon_setup/all.mcfunction | 9 ++++-- .../summon/summon_ravagers.mcfunction | 23 +++++++++++--- .../level_controller/generate_mobs.mcfunction | 8 ++++- .../generate_mobs/generate_a_mob.mcfunction | 8 ----- .../generate_a_ravager.mcfunction | 28 +++++++++++++++++ .../get_from_random_number.mcfunction | 8 +++++ .../generate_mobs/l1z1.mcfunction | 11 +++++-- .../generate_mobs/l1z2.mcfunction | 16 ++++++++++ .../generate_mobs/l1z3.mcfunction | 16 ++++++++++ .../generate_mobs/l1z4.mcfunction | 16 ++++++++++ .../generate_mobs/l1z5.mcfunction | 16 ++++++++++ .../generate_mobs/l2z1.mcfunction | 16 ++++++++++ .../generate_mobs/l2z2.mcfunction | 16 ++++++++++ .../generate_mobs/l2z3.mcfunction | 16 ++++++++++ .../generate_mobs/l2z4.mcfunction | 16 ++++++++++ .../generate_mobs/l2z5.mcfunction | 16 ++++++++++ .../count_inside_barrel.mcfunction | 1 - .../get_mob_count/count_mobs.mcfunction | 3 +- .../get_mob_count/l1.mcfunction | 18 ++++++----- .../get_mob_count/l2.mcfunction | 21 +++++++++++++ .../get_mob_count/l3.mcfunction | 6 ++++ .../get_mob_count/l4.mcfunction | 15 ++++++++++ .../get_mob_names/get_mob_names.mcfunction | 3 ++ .../get_names_from_barrel.mcfunction | 29 ------------------ .../get_names_from_shulker.mcfunction | 30 +++++++++++++++++++ .../get_mob_names/l1.mcfunction | 18 ++++++----- .../get_mob_names/l2.mcfunction | 21 +++++++++++++ .../get_mob_names/l3.mcfunction | 6 ++++ .../get_mob_names/l4.mcfunction | 15 ++++++++++ .../scoreboard/setup/config.mcfunction | 27 ++++++++++------- .../scoreboard/setup/utility.mcfunction | 1 + .../data/do2/functions/version.mcfunction | 4 +-- 32 files changed, 381 insertions(+), 76 deletions(-) delete mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_mob.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_ravager.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/get_from_random_number.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z2.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z3.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z4.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z5.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z1.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z2.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z3.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z4.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z5.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l2.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l3.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l4.mcfunction delete mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_barrel.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_shulker.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l2.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l3.mcfunction create mode 100644 Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l4.mcfunction diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction index 904cf2e4..575728e6 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction @@ -11,9 +11,14 @@ function do2:dungeon_setup/refill/all execute if score $dungeon do2.config.fr.resetComposters matches 1 run function do2:dungeon_setup/reset_composters execute if score $dungeon do2.config.fr.cakeGauntlet matches 1 run setblock -618 -47 1988 cake[bites=0] +function do2:level_controller/clone_storages +function do2:level_controller/get_mob_count/count_mobs +function do2:level_controller/get_mob_names/get_mob_names +function do2:dungeon_setup/summon/ravagers + # - Start Log - -execute as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Testing for required entities. ("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"text":"§rIncludes:\n - Teleport Markers\n - Ravagers\n - Wardens\n - §oOne Eyed Willy§r\n - §oDavy Bones§r\n - §oEndermites§r\n - §oEvokers§r"}]}},{"text":")"}] -function do2:dungeon_setup/test_for_ravagers +#execute as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Testing for required entities. ("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"text":"§rIncludes:\n - Teleport Markers\n - Ravagers\n - Wardens\n - §oOne Eyed Willy§r\n - §oDavy Bones§r\n - §oEndermites§r\n - §oEvokers§r"}]}},{"text":")"}] +#function do2:dungeon_setup/test_for_ravagers function do2:dungeon_setup/test_for_wardens function do2:dungeon_setup/test_for_other_killers function do2:dungeon_setup/test_for_markers 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 c5207778..4e11073d 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 @@ -2,12 +2,27 @@ execute as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: Summoning Ravagers."}] # - End Log - + +#L1 +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 +#L2 +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 + + #L1 -execute if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:dungeon_setup/summon/no_zones/summon_level_1_killers -execute if score $dungeon do2.config.mc.level1Zones matches 1 run function do2:dungeon_setup/summon/with_zones/summon_level_1_killers +#execute if score $dungeon do2.config.mc.level1Zones matches 0 run function do2:dungeon_setup/summon/no_zones/summon_level_1_killers +#execute if score $dungeon do2.config.mc.level1Zones matches 1 run function do2:dungeon_setup/summon/with_zones/summon_level_1_killers #L2 -execute if score $dungeon do2.config.mc.level2Zones matches 0 run function do2:dungeon_setup/summon/no_zones/summon_level_2_killers -execute if score $dungeon do2.config.mc.level2Zones matches 1 run function do2:dungeon_setup/summon/with_zones/summon_level_2_killers +#execute if score $dungeon do2.config.mc.level2Zones matches 0 run function do2:dungeon_setup/summon/no_zones/summon_level_2_killers +#execute if score $dungeon do2.config.mc.level2Zones matches 1 run function do2:dungeon_setup/summon/with_zones/summon_level_2_killers # 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} 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 e54db6d9..957d48ae 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs.mcfunction @@ -3,5 +3,11 @@ function do2:level_controller/get_mob_count/count_mobs function do2:level_controller/get_mob_names/get_mob_names -# L1Z1 + +# L1 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 + diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_mob.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_mob.mcfunction deleted file mode 100644 index bbc0b511..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_mob.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -# Coords -500 70 2000 -# Summon mobs with tag: newly_generated_mob - -# Amount of mobs to summon: -# $dungeon do2.utility.mobGeneration - -# Mob names: data storage. -# do2:mobs mobNames diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_ravager.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_ravager.mcfunction new file mode 100644 index 00000000..327ea805 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_ravager.mcfunction @@ -0,0 +1,28 @@ +# If no more mobs need to be made, return +execute if score $dungeon do2.utility.mobGeneration matches 0 run return + +# 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} + +# Count how many names are in the list. +execute store result score $dungeon do2.utility.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 +function do2:random_gen/generate_random_number + +# Copy both the SCORE and the DATA as we will be making modifications +scoreboard players operation $dungeon_2 do2.utility.mobNamesCount = $dungeon do2.utility.randomNum +data modify storage do2:mobs copy set from storage do2:mobs mobNames +# Remove names until do2:mobs copy[0] becomes the randomly chosen name. +function do2:level_controller/generate_mobs/get_from_random_number + +# Merge the randomly chosen name INTO the mob +data modify entity @e[tag=mob_being_worked_on,limit=1] CustomName set from storage do2:mobs copy[0] + + +# 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 +# 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_a_ravager diff --git a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/get_from_random_number.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/get_from_random_number.mcfunction new file mode 100644 index 00000000..7437aa0a --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/get_from_random_number.mcfunction @@ -0,0 +1,8 @@ +# If NO MORE need to be removed, return out of this function. +execute if score $dungeon_2 do2.utility.mobNamesCount matches ..0 run return 0 +# Remove ONE from both the SCORE +scoreboard players remove $dungeon_2 do2.utility.mobNamesCount 1 +# And remove ONE from the array +data remove storage do2:mobs copy[0] +# If MORE is needed to be remove, repeat this function +execute unless score $dungeon_2 do2.utility.mobNamesCount matches ..0 run function do2:level_controller/generate_mobs/get_from_random_number 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 index e718dbec..37af065d 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z1.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z1.mcfunction @@ -1,8 +1,15 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone1 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z1's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level1_zone1 set value ['{"text":""}'] + + # Setup -scoreboard players operation $dungeon do2.utility.mobGeneration = $dungeon do2.config.mc.level1Zone1MobCount +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 -function do2:level_controller/generate_mobs/generate_a_mob +function do2:level_controller/generate_mobs/generate_a_ravager # Finish execute as @e[tag=newly_generated_mob] run tp @s @e[type=marker,tag=L1Z1,limit=1,sort=random] 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 new file mode 100644 index 00000000..eaf2276c --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z2.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone2 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z2's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level1_zone2 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..ca59c33c --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z3.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone3 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z3's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level1_zone3 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..5709dfc8 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z4.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone4 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z4's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level1_zone4 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..d3ba2455 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z5.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level1_zone5 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L1Z5's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level1_zone5 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..86b01ab5 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z1.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +execute if score $l2z1 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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level2_zone1 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z5's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level2_zone1 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..206c4c25 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z2.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level2_zone2 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z2's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level2_zone2 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..3a65e329 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z3.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level2_zone3 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z3's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level2_zone3 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..1c408461 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z4.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level2_zone4 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z4's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level2_zone4 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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 new file mode 100644 index 00000000..7220f7c6 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z5.mcfunction @@ -0,0 +1,16 @@ +# Check for issues +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 store result score $dungeon do2.utility.mobNamesCount run data get storage do2:mobs level2_zone5 +execute if score $dungeon do2.utility.mobNamesCount matches 0 as @a[scores={do2.logs.dungeon_setup=3..}] run tellraw @s ["",{"text":"[§9B§r]: L2Z5's mob names are empty. Mob's names will be empty."}] +execute if score $dungeon do2.utility.mobNamesCount matches 0 run data modify storage do2:mobs level2_zone5 set value ['{"text":""}'] + +# Setup +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 + +function do2:level_controller/generate_mobs/generate_a_ravager + +# 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/get_mob_count/count_inside_barrel.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_inside_barrel.mcfunction index a652b45f..0a72cb03 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,4 +1,3 @@ - scoreboard players set $dungeon do2.utility.mobCountCounterTotal 0 # Count each slot 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 2e56c31d..36ad96ce 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 +1,2 @@ -function do2:level_controller/decide_mob_count/l1 +function do2:level_controller/get_mob_count/l1 +function do2:level_controller/get_mob_count/l2 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 cb0a6af4..604f391d 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,19 +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 $dungeon do2.config.mc.level1Zone1MobCount = $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.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 $dungeon do2.config.mc.level1Zone2MobCount = $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.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 $dungeon do2.config.mc.level1Zone3MobCount = $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.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 $dungeon do2.config.mc.level1Zone1MobCount = $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.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 $dungeon do2.config.mc.level1Zone2MobCount = $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.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 $dungeon do2.config.mc.level1Zone3MobCount = $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.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 $dungeon do2.config.mc.level1Zone4MobCount = $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.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 $dungeon do2.config.mc.level1Zone5MobCount = $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.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 new file mode 100644 index 00000000..2fe67122 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l2.mcfunction @@ -0,0 +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 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 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 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 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 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 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 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 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 new file mode 100644 index 00000000..536b3317 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l3.mcfunction @@ -0,0 +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 +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 +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 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 new file mode 100644 index 00000000..6b9620cc --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/l4.mcfunction @@ -0,0 +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 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 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 + +# - 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 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 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 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 3c499ffa..b029b370 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 @@ -1 +1,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 diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_barrel.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_barrel.mcfunction deleted file mode 100644 index 0a7c1188..00000000 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_barrel.mcfunction +++ /dev/null @@ -1,29 +0,0 @@ -data modify storage do2:mob_names temp set value [] - -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[0].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[1].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[2].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[3].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[4].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[5].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[6].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[7].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[8].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[9].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[10].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[11].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[12].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[13].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[14].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[15].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[16].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[17].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[18].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[19].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[20].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[21].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[22].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[23].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[24].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[25].tag.display.Name -data modify storage do2:mob_names temp append from block ~ ~ ~ Items[26].tag.display.Name diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_shulker.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_shulker.mcfunction new file mode 100644 index 00000000..e1c35212 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/get_names_from_shulker.mcfunction @@ -0,0 +1,30 @@ +data modify storage do2:mobs temp set value [] + +# Get all item names +data modify storage do2:mobs temp append from block ~ ~ ~ Items[0].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[1].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[2].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[3].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[4].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[5].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[6].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[7].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[8].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[9].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[10].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[11].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[12].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[13].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[14].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[15].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[16].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[17].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[18].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[19].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[20].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[21].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[22].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[23].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[24].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[25].tag.display.Name +data modify storage do2:mobs temp append from block ~ ~ ~ Items[26].tag.display.Name diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l1.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l1.mcfunction index c5c1c01c..f716e37c 100644 --- a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l1.mcfunction +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l1.mcfunction @@ -1,19 +1,21 @@ # - WITH ZONES - -execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 123 1945 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 123 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 1 run data modify storage do2:mobs level1_zone1 set from storage do2:mobs temp -execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 123 1944 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 123 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 1 run data modify storage do2:mobs level1_zone2 set from storage do2:mobs temp -execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 123 1943 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 1 positioned -527 123 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 1 run data modify storage do2:mobs level1_zone3 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level1Zones matches 1 run data modify storage do2:mobs level1_zone4 set value [] +execute if score $dungeon do2.config.mc.level1Zones matches 1 run data modify storage do2:mobs level1_zone5 set value [] # - WITHOUT ZONES - -execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1946 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1946 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 0 run data modify storage do2:mobs level1_zone1 set from storage do2:mobs temp -execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1945 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 0 run data modify storage do2:mobs level1_zone2 set from storage do2:mobs temp -execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1944 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 0 run data modify storage do2:mobs level1_zone3 set from storage do2:mobs temp -execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1943 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 0 run data modify storage do2:mobs level1_zone4 set from storage do2:mobs temp -execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1942 run function do2:level_controller/get_mob_names/get_names_from_barrel +execute if score $dungeon do2.config.mc.level1Zones matches 0 positioned -527 126 1942 run function do2:level_controller/get_mob_names/get_names_from_shulker execute if score $dungeon do2.config.mc.level1Zones matches 0 run data modify storage do2:mobs level1_zone5 set from storage do2:mobs temp diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l2.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l2.mcfunction new file mode 100644 index 00000000..5b1c8fc2 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l2.mcfunction @@ -0,0 +1,21 @@ +# - WITH ZONES - +execute if score $dungeon do2.config.mc.level2Zones matches 1 positioned -525 123 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 1 run data modify storage do2:mobs level2_zone1 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 1 positioned -525 123 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 1 run data modify storage do2:mobs level2_zone2 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 1 positioned -525 123 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 1 run data modify storage do2:mobs level2_zone3 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 1 run data modify storage do2:mobs level2_zone4 set value [] +execute if score $dungeon do2.config.mc.level2Zones matches 1 run data modify storage do2:mobs level2_zone5 set value [] + +# - WITHOUT ZONES - +execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 126 1946 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 0 run data modify storage do2:mobs level2_zone1 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 126 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 0 run data modify storage do2:mobs level2_zone2 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 126 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 0 run data modify storage do2:mobs level2_zone3 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 126 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 0 run data modify storage do2:mobs level2_zone4 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level2Zones matches 0 positioned -525 126 1942 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level2Zones matches 0 run data modify storage do2:mobs level2_zone5 set from storage do2:mobs temp diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l3.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l3.mcfunction new file mode 100644 index 00000000..8cc6e499 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l3.mcfunction @@ -0,0 +1,6 @@ +execute positioned -523 123 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker +data modify storage do2:mobs level3_zone1 set from storage do2:mobs temp +execute positioned -523 123 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker +data modify storage do2:mobs level3_zone2 set from storage do2:mobs temp +execute positioned -523 123 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker +data modify storage do2:mobs level3_zone3 set from storage do2:mobs temp diff --git a/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l4.mcfunction b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l4.mcfunction new file mode 100644 index 00000000..2f167a54 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/level_controller/get_mob_names/l4.mcfunction @@ -0,0 +1,15 @@ +# - WITH ZONES - +execute if score $dungeon do2.config.mc.level4Zones matches 1 positioned -521 123 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level4Zones matches 1 run data modify storage do2:mobs level4_zone1 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level4Zones matches 1 positioned -521 123 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level4Zones matches 1 run data modify storage do2:mobs level4_zone2 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level4Zones matches 1 positioned -521 123 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level4Zones matches 1 run data modify storage do2:mobs level4_zone3 set from storage do2:mobs temp + +# - WITHOUT ZONES - +execute if score $dungeon do2.config.mc.level4Zones matches 0 positioned -521 126 1945 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level4Zones matches 0 run data modify storage do2:mobs level4_zone1 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level4Zones matches 0 positioned -521 126 1944 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level4Zones matches 0 run data modify storage do2:mobs level4_zone2 set from storage do2:mobs temp +execute if score $dungeon do2.config.mc.level4Zones matches 0 positioned -521 126 1943 run function do2:level_controller/get_mob_names/get_names_from_shulker +execute if score $dungeon do2.config.mc.level4Zones matches 0 run data modify storage do2:mobs level4_zone3 set from storage do2:mobs temp diff --git a/Brilliance Datapack/data/do2/functions/scoreboard/setup/config.mcfunction b/Brilliance Datapack/data/do2/functions/scoreboard/setup/config.mcfunction index e4db7d0c..81b95852 100644 --- a/Brilliance Datapack/data/do2/functions/scoreboard/setup/config.mcfunction +++ b/Brilliance Datapack/data/do2/functions/scoreboard/setup/config.mcfunction @@ -106,16 +106,23 @@ scoreboard objectives add do2.config.mc.level2Zones dummy "Whether level 2 shoul execute unless score $dungeon do2.config.mc.level2Zones matches 0.. run scoreboard players set $dungeon do2.config.mc.level2Zones 1 scoreboard objectives add do2.config.mc.level4Zones dummy "Whether level 4 should have zones" execute unless score $dungeon do2.config.mc.level4Zones matches 0.. run scoreboard players set $dungeon do2.config.mc.level4Zones 1 -scoreboard objectives add do2.config.mc.level1Zone1MobCount dummy "How many mobs in L1 Z1" -execute unless score $dungeon do2.config.mc.level1Zone1MobCount matches 0.. run scoreboard players set $dungeon do2.config.mc.level1Zone1MobCount 1 -scoreboard objectives add do2.config.mc.level1Zone2MobCount dummy "How many mobs in L1 Z2" -execute unless score $dungeon do2.config.mc.level1Zone2MobCount matches 0.. run scoreboard players set $dungeon do2.config.mc.level1Zone2MobCount 1 -scoreboard objectives add do2.config.mc.level1Zone3MobCount dummy "How many mobs in L1 Z3" -execute unless score $dungeon do2.config.mc.level1Zone3MobCount matches 0.. run scoreboard players set $dungeon do2.config.mc.level1Zone3MobCount 1 -scoreboard objectives add do2.config.mc.level1Zone4MobCount dummy "How many mobs in L1 Z4" -execute unless score $dungeon do2.config.mc.level1Zone4MobCount matches 0.. run scoreboard players set $dungeon do2.config.mc.level1Zone4MobCount 1 -scoreboard objectives add do2.config.mc.level1Zone5MobCount dummy "How many mobs in L1 Z5" -execute unless score $dungeon do2.config.mc.level1Zone5MobCount matches 0.. run scoreboard players set $dungeon do2.config.mc.level1Zone5MobCount 1 +scoreboard objectives add do2.config.mc.levelZoneMobCount dummy "How many mobs should be in each zone." +execute unless score $l1z1 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l1z1 do2.config.mc.levelZoneMobCount 1 +execute unless score $l1z2 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l1z2 do2.config.mc.levelZoneMobCount 1 +execute unless score $l1z3 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l1z3 do2.config.mc.levelZoneMobCount 1 +execute unless score $l1z4 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l1z4 do2.config.mc.levelZoneMobCount 1 +execute unless score $l1z5 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l1z5 do2.config.mc.levelZoneMobCount 1 +execute unless score $l2z1 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l2z1 do2.config.mc.levelZoneMobCount 1 +execute unless score $l2z2 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l2z2 do2.config.mc.levelZoneMobCount 1 +execute unless score $l2z3 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l2z3 do2.config.mc.levelZoneMobCount 1 +execute unless score $l2z4 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l2z4 do2.config.mc.levelZoneMobCount 1 +execute unless score $l2z5 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l2z5 do2.config.mc.levelZoneMobCount 1 +execute unless score $l3z1 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l3z1 do2.config.mc.levelZoneMobCount 1 +execute unless score $l3z2 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l3z2 do2.config.mc.levelZoneMobCount 1 +execute unless score $l3z3 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l3z3 do2.config.mc.levelZoneMobCount 1 +execute unless score $l4z1 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l4z1 do2.config.mc.levelZoneMobCount 1 +execute unless score $l4z2 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l4z2 do2.config.mc.levelZoneMobCount 1 +execute unless score $l4z3 do2.config.mc.levelZoneMobCount matches 0.. run scoreboard players set $l4z3 do2.config.mc.levelZoneMobCount 1 # Player Config: Player's last used Dungeon Difficulty. diff --git a/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction b/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction index c75c6acc..2b24c6b3 100644 --- a/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction +++ b/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction @@ -32,6 +32,7 @@ scoreboard objectives add do2.utility.receivedJackpot dummy "Used to count the k 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.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 diff --git a/Brilliance Datapack/data/do2/functions/version.mcfunction b/Brilliance Datapack/data/do2/functions/version.mcfunction index 358100eb..20bdbcf2 100644 --- a/Brilliance Datapack/data/do2/functions/version.mcfunction +++ b/Brilliance Datapack/data/do2/functions/version.mcfunction @@ -1,4 +1,4 @@ -# DATAPACK VERSION NUMBER: 0.12.14 +# DATAPACK VERSION NUMBER: 0.12.15 -tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.12.14§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.12.15§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":"."}]