diff --git a/Brilliance Datapack/TODO.md b/Brilliance Datapack/TODO.md index fd8099df..eee56013 100644 --- a/Brilliance Datapack/TODO.md +++ b/Brilliance Datapack/TODO.md @@ -2,8 +2,7 @@ - Randomly determine TIME of day, instead of just day/night - Automate do2.lifetime.escaped.crowns - Actually... is this score needed? It's essentially crowns spent + whatever crowns they have on them. -- Automate do2.lifetime.escaped.embers - - Actually... is this score needed? It's essentially embers spent... + - Track embers DROPPED in dungeon - Track embers ATTEMPTED to be RELEASED. - Track treasure DROPPED in dungoen diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction index 789fa2f1..904cf2e4 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/all.mcfunction @@ -29,7 +29,6 @@ function do2:scoreboard/config/balance_changes/actions # Other Setup: function do2:scoreboard/config/config_setup -function do2:random_gen/random_setup # Whether Max Clank Disables Treasure execute if score $dungeon do2.config.maxClankTreasure matches 1 run setblock -624 25 1990 minecraft:redstone_wire diff --git a/Brilliance Datapack/data/do2/functions/dungeon_setup/decide_day_or_night.mcfunction b/Brilliance Datapack/data/do2/functions/dungeon_setup/decide_day_or_night.mcfunction index 6e93d579..bdca40e4 100644 --- a/Brilliance Datapack/data/do2/functions/dungeon_setup/decide_day_or_night.mcfunction +++ b/Brilliance Datapack/data/do2/functions/dungeon_setup/decide_day_or_night.mcfunction @@ -1,9 +1,10 @@ # Whether it's DAY or NIGHT. time set noon -function do2:random_gen/gen_random_percentage -execute if score @e[type=marker,tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum < $dungeon do2.config.nightTimeChance run time set night +scoreboard players set $dungeon do2.utility.randomNumberRange 100 +function do2:random_gen/generate_random_number +execute if score $dungeon do2.utility.randomNum < $dungeon do2.config.nightTimeChance run time set night # - Start Log - -execute unless score @e[type=marker,tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum < $dungeon do2.config.nightTimeChance as @a[scores={do2.logs.dungeon_setup=1..}] run tellraw @s ["",{"text":"§f[§9B§f]: Time of day randomly set to: §eDAY §r("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"text":"§fChance of Night Time: "},{"score":{"name":"$dungeon","objective":"do2.config.nightTimeChance"},"color":"aqua"},{"text":"§b%\n§fRandomly Generated Number: "},{"color":"aqua","score":{"name":"@e[type=marker,tag=RandomGenerator_RESULT,limit=1]","objective":"do2.utility.randomNum"}}]}},{"text":")"}] -execute if score @e[type=marker,tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum < $dungeon do2.config.nightTimeChance as @a[scores={do2.logs.dungeon_setup=1..}] run tellraw @s ["",{"text":"§f[§9B§f]: Time of day randomly set to: §8NIGHT §r("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"text":"§fChance of Night Time: "},{"score":{"name":"$dungeon","objective":"do2.config.nightTimeChance"},"color":"aqua"},{"text":"§b%\n§fRandomly Generated Number: "},{"color":"aqua","score":{"name":"@e[type=marker,tag=RandomGenerator_RESULT,limit=1]","objective":"do2.utility.randomNum"}}]}},{"text":")"}] +execute unless score $dungeon do2.utility.randomNum < $dungeon do2.config.nightTimeChance as @a[scores={do2.logs.dungeon_setup=1..}] run tellraw @s ["",{"text":"§f[§9B§f]: Time of day randomly set to: §eDAY §r("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"text":"§fChance of Night Time: "},{"score":{"name":"$dungeon","objective":"do2.config.nightTimeChance"},"color":"aqua"},{"text":"§b%\n§fRandomly Generated Number: "},{"color":"aqua","score":{"name":"$dungeon","objective":"do2.utility.randomNum"}}]}},{"text":")"}] +execute if score $dungeon do2.utility.randomNum < $dungeon do2.config.nightTimeChance as @a[scores={do2.logs.dungeon_setup=1..}] run tellraw @s ["",{"text":"§f[§9B§f]: Time of day randomly set to: §8NIGHT §r("},{"text":" ? ","color":"dark_red","hoverEvent":{"action":"show_text","contents":["",{"text":"§fChance of Night Time: "},{"score":{"name":"$dungeon","objective":"do2.config.nightTimeChance"},"color":"aqua"},{"text":"§b%\n§fRandomly Generated Number: "},{"color":"aqua","score":{"name":"$dungeon","objective":"do2.utility.randomNum"}}]}},{"text":")"}] # - End Log - diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant.mcfunction new file mode 100644 index 00000000..6bc301df --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant.mcfunction @@ -0,0 +1,29 @@ +# Preset 256 +scoreboard players set $num do2.utility.fishVariant 256 + +# Determine pattern color +scoreboard players set $dungeon do2.utility.randomNumberRange 16 +function do2:random_gen/generate_random_number +scoreboard players operation $dungeon do2.utility.fishVariant += $dungeon do2.utility.randomNum +scoreboard players operation $dungeon do2.utility.fishVariant *= $num do2.utility.fishVariant + +# Determine base color +scoreboard players set $dungeon do2.utility.randomNumberRange 16 +function do2:random_gen/generate_random_number +scoreboard players operation $dungeon do2.utility.fishVariant += $dungeon do2.utility.randomNum +scoreboard players operation $dungeon do2.utility.fishVariant *= $num do2.utility.fishVariant + +# Add fish pattern +scoreboard players set $dungeon do2.utility.randomNumberRange 6 +function do2:random_gen/generate_random_number +scoreboard players operation $dungeon do2.utility.fishVariant += $dungeon do2.utility.randomNum +scoreboard players operation $dungeon do2.utility.fishVariant *= $num do2.utility.fishVariant + +# Add fish Size +scoreboard players set $dungeon do2.utility.randomNumberRange 2 +function do2:random_gen/generate_random_number +scoreboard players operation $dungeon do2.utility.fishVariant += $dungeon do2.utility.randomNum + + + + diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_base_color.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_base_color.mcfunction deleted file mode 100644 index 7e1390ed..00000000 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_base_color.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -tag @e[tag=RandomGenerator_2] add RandomGenerator_Using -tag @e[tag=RandomGenerator_3] add RandomGenerator_Using -tag @e[tag=RandomGenerator_4] add RandomGenerator_Using -tag @e[tag=RandomGenerator_5] add RandomGenerator_Using -tag @e[tag=RandomGenerator_6] add RandomGenerator_Using -tag @e[tag=RandomGenerator_7] add RandomGenerator_Using -tag @e[tag=RandomGenerator_8] add RandomGenerator_Using -tag @e[tag=RandomGenerator_9] add RandomGenerator_Using -tag @e[tag=RandomGenerator_10] add RandomGenerator_Using -tag @e[tag=RandomGenerator_11] add RandomGenerator_Using -tag @e[tag=RandomGenerator_12] add RandomGenerator_Using -tag @e[tag=RandomGenerator_13] add RandomGenerator_Using -tag @e[tag=RandomGenerator_14] add RandomGenerator_Using -tag @e[tag=RandomGenerator_15] add RandomGenerator_Using -scoreboard players operation $dungeon do2.utility.fishVariant += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum - - diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_pattern.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_pattern.mcfunction deleted file mode 100644 index 4868ae8d..00000000 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_pattern.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -tag @e[tag=RandomGenerator_2] add RandomGenerator_Using -tag @e[tag=RandomGenerator_3] add RandomGenerator_Using -tag @e[tag=RandomGenerator_4] add RandomGenerator_Using -tag @e[tag=RandomGenerator_5] add RandomGenerator_Using -scoreboard players operation $dungeon do2.utility.fishVariant += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum - - diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_pattern_color.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_pattern_color.mcfunction deleted file mode 100644 index 7e1390ed..00000000 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_pattern_color.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -tag @e[tag=RandomGenerator_2] add RandomGenerator_Using -tag @e[tag=RandomGenerator_3] add RandomGenerator_Using -tag @e[tag=RandomGenerator_4] add RandomGenerator_Using -tag @e[tag=RandomGenerator_5] add RandomGenerator_Using -tag @e[tag=RandomGenerator_6] add RandomGenerator_Using -tag @e[tag=RandomGenerator_7] add RandomGenerator_Using -tag @e[tag=RandomGenerator_8] add RandomGenerator_Using -tag @e[tag=RandomGenerator_9] add RandomGenerator_Using -tag @e[tag=RandomGenerator_10] add RandomGenerator_Using -tag @e[tag=RandomGenerator_11] add RandomGenerator_Using -tag @e[tag=RandomGenerator_12] add RandomGenerator_Using -tag @e[tag=RandomGenerator_13] add RandomGenerator_Using -tag @e[tag=RandomGenerator_14] add RandomGenerator_Using -tag @e[tag=RandomGenerator_15] add RandomGenerator_Using -scoreboard players operation $dungeon do2.utility.fishVariant += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum - - diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_size.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_size.mcfunction deleted file mode 100644 index 2cee55a2..00000000 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/add_size.mcfunction +++ /dev/null @@ -1,7 +0,0 @@ -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -scoreboard players operation $dungeon do2.utility.fishVariant += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum - - diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/determine_variant.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/determine_variant.mcfunction deleted file mode 100644 index 10ddecc6..00000000 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/determine_variant/determine_variant.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -function do2:mob_spawning/fish_counts/determine_variant/add_pattern_color -scoreboard players operation $dungeon do2.utility.fishVariant *= @e[type=marker,tag=RandomGenerator_256,limit=1] do2.utility.randomNum -function do2:mob_spawning/fish_counts/determine_variant/add_base_color -scoreboard players operation $dungeon do2.utility.fishVariant *= @e[type=marker,tag=RandomGenerator_256,limit=1] do2.utility.randomNum -function do2:mob_spawning/fish_counts/determine_variant/add_pattern -scoreboard players operation $dungeon do2.utility.fishVariant *= @e[type=marker,tag=RandomGenerator_256,limit=1] do2.utility.randomNum -function do2:mob_spawning/fish_counts/determine_variant/add_size - diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_common_variant.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_common_variant.mcfunction index e7d8d5a2..e66c9c8f 100644 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_common_variant.mcfunction +++ b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_common_variant.mcfunction @@ -1,49 +1,27 @@ -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -tag @e[tag=RandomGenerator_2] add RandomGenerator_Using -tag @e[tag=RandomGenerator_3] add RandomGenerator_Using -tag @e[tag=RandomGenerator_4] add RandomGenerator_Using -tag @e[tag=RandomGenerator_5] add RandomGenerator_Using -tag @e[tag=RandomGenerator_6] add RandomGenerator_Using -tag @e[tag=RandomGenerator_7] add RandomGenerator_Using -tag @e[tag=RandomGenerator_8] add RandomGenerator_Using -tag @e[tag=RandomGenerator_9] add RandomGenerator_Using -tag @e[tag=RandomGenerator_10] add RandomGenerator_Using -tag @e[tag=RandomGenerator_11] add RandomGenerator_Using -tag @e[tag=RandomGenerator_12] add RandomGenerator_Using -tag @e[tag=RandomGenerator_13] add RandomGenerator_Using -tag @e[tag=RandomGenerator_14] add RandomGenerator_Using -tag @e[tag=RandomGenerator_15] add RandomGenerator_Using -tag @e[tag=RandomGenerator_16] add RandomGenerator_Using -tag @e[tag=RandomGenerator_17] add RandomGenerator_Using -tag @e[tag=RandomGenerator_18] add RandomGenerator_Using -tag @e[tag=RandomGenerator_19] add RandomGenerator_Using -tag @e[tag=RandomGenerator_20] add RandomGenerator_Using -tag @e[tag=RandomGenerator_21] add RandomGenerator_Using -scoreboard players operation @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 0 run summon minecraft:tropical_fish ~ ~ ~ {Variant:65536,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 1 run summon minecraft:tropical_fish ~ ~ ~ {Variant:459008,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 2 run summon minecraft:tropical_fish ~ ~ ~ {Variant:917504,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 3 run summon minecraft:tropical_fish ~ ~ ~ {Variant:918273,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 4 run summon minecraft:tropical_fish ~ ~ ~ {Variant:918529,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 5 run summon minecraft:tropical_fish ~ ~ ~ {Variant:16778497,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 6 run summon minecraft:tropical_fish ~ ~ ~ {Variant:50660352,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 7 run summon minecraft:tropical_fish ~ ~ ~ {Variant:50726144,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 8 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67108865,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 9 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67110144,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 10 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67371009,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 11 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67699456,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 12 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67764993,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 13 run summon minecraft:tropical_fish ~ ~ ~ {Variant:101253888,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 14 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117441025,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 15 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117441793,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 16 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117506305,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 17 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117899265,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 18 run summon minecraft:tropical_fish ~ ~ ~ {Variant:118161664,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 19 run summon minecraft:tropical_fish ~ ~ ~ {Variant:185008129,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 20 run summon minecraft:tropical_fish ~ ~ ~ {Variant:234882305,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 21 run summon minecraft:tropical_fish ~ ~ ~ {Variant:235340288,Tags:["do2.manually_spawned"]} -execute if score @e[tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 22.. run function do2:mob_spawning/fish_counts/summon_common_variant +scoreboard players set $dungeon do2.utility.randomNumberRange 22 +function do2:random_gen/generate_random_number + +execute if score $dungeon do2.utility.randomNum matches 0 run summon minecraft:tropical_fish ~ ~ ~ {Variant:65536,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 1 run summon minecraft:tropical_fish ~ ~ ~ {Variant:459008,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 2 run summon minecraft:tropical_fish ~ ~ ~ {Variant:917504,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 3 run summon minecraft:tropical_fish ~ ~ ~ {Variant:918273,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 4 run summon minecraft:tropical_fish ~ ~ ~ {Variant:918529,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 5 run summon minecraft:tropical_fish ~ ~ ~ {Variant:16778497,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 6 run summon minecraft:tropical_fish ~ ~ ~ {Variant:50660352,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 7 run summon minecraft:tropical_fish ~ ~ ~ {Variant:50726144,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 8 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67108865,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 9 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67110144,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 10 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67371009,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 11 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67699456,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 12 run summon minecraft:tropical_fish ~ ~ ~ {Variant:67764993,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 13 run summon minecraft:tropical_fish ~ ~ ~ {Variant:101253888,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 14 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117441025,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 15 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117441793,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 16 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117506305,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 17 run summon minecraft:tropical_fish ~ ~ ~ {Variant:117899265,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 18 run summon minecraft:tropical_fish ~ ~ ~ {Variant:118161664,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 19 run summon minecraft:tropical_fish ~ ~ ~ {Variant:185008129,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 20 run summon minecraft:tropical_fish ~ ~ ~ {Variant:234882305,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 21 run summon minecraft:tropical_fish ~ ~ ~ {Variant:235340288,Tags:["do2.manually_spawned"]} +execute if score $dungeon do2.utility.randomNum matches 22.. run function do2:mob_spawning/fish_counts/summon_common_variant diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_fish.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_fish.mcfunction index 06ade2b9..3f97e8fb 100644 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_fish.mcfunction +++ b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_fish.mcfunction @@ -1,3 +1,4 @@ -function do2:random_gen/get_random_num -execute if score @e[type=marker,tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches ..8 run function do2:mob_spawning/fish_counts/summon_common_variant -execute if score @e[type=marker,tag=RandomGenerator_RESULT,limit=1] do2.utility.randomNum matches 9.. run function do2:mob_spawning/fish_counts/summon_random_variant +scoreboard players set $dungeon do2.utility.randomNumberRange 10 +function do2:random_gen/generate_random_number +execute if score $dungeon do2.utility.randomNum matches ..8 run function do2:mob_spawning/fish_counts/summon_common_variant +execute if score $dungeon do2.utility.randomNum matches 9.. run function do2:mob_spawning/fish_counts/summon_random_variant diff --git a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_random_variant.mcfunction b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_random_variant.mcfunction index 773e02cd..eb8549b4 100644 --- a/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_random_variant.mcfunction +++ b/Brilliance Datapack/data/do2/functions/mob_spawning/fish_counts/summon_random_variant.mcfunction @@ -1,4 +1,4 @@ summon minecraft:tropical_fish ~ ~ ~ {Variant:235340288,Tags:["determine_variant","do2.manually_spawned"]} -function do2:mob_spawning/fish_counts/determine_variant/determine_variant +function do2:mob_spawning/fish_counts//determine_variant execute store result entity @e[type=minecraft:tropical_fish,tag=determine_variant,limit=1] Variant double 1 run scoreboard players get $dungeon do2.utility.fishVariant tag @e[type=minecraft:tropical_fish,tag=determine_variant] remove determine_variant diff --git a/Brilliance Datapack/data/do2/functions/random_gen/gen_random_percentage.mcfunction b/Brilliance Datapack/data/do2/functions/random_gen/gen_random_percentage.mcfunction deleted file mode 100644 index aab1f1f6..00000000 --- a/Brilliance Datapack/data/do2/functions/random_gen/gen_random_percentage.mcfunction +++ /dev/null @@ -1,15 +0,0 @@ -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -tag @e[tag=RandomGenerator_2] add RandomGenerator_Using -tag @e[tag=RandomGenerator_3] add RandomGenerator_Using -tag @e[tag=RandomGenerator_4] add RandomGenerator_Using -tag @e[tag=RandomGenerator_5] add RandomGenerator_Using -tag @e[tag=RandomGenerator_6] add RandomGenerator_Using -tag @e[tag=RandomGenerator_7] add RandomGenerator_Using -tag @e[tag=RandomGenerator_8] add RandomGenerator_Using -tag @e[tag=RandomGenerator_9] add RandomGenerator_Using -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -scoreboard players operation @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum -scoreboard players operation @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum *= @e[type=marker,tag=RandomGenerator_10,limit=1] do2.utility.randomNum -scoreboard players operation @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum diff --git a/Brilliance Datapack/data/do2/functions/random_gen/generate_random_number.mcfunction b/Brilliance Datapack/data/do2/functions/random_gen/generate_random_number.mcfunction new file mode 100644 index 00000000..1e9b2cd5 --- /dev/null +++ b/Brilliance Datapack/data/do2/functions/random_gen/generate_random_number.mcfunction @@ -0,0 +1,4 @@ +summon area_effect_cloud ~ ~ ~ {Tags:["random_uuid"]} +execute store result score $dungeon do2.utility.randomNum run data get entity @e[type=area_effect_cloud,tag=random_uuid,limit=1] UUID[0] 1 +scoreboard players operation $dungeon do2.utility.randomNum %= $dungeon do2.utility.randomNumberRange +kill @e[type=area_effect_cloud,tag=random_uuid] diff --git a/Brilliance Datapack/data/do2/functions/random_gen/get_random_num.mcfunction b/Brilliance Datapack/data/do2/functions/random_gen/get_random_num.mcfunction deleted file mode 100644 index 7fe05806..00000000 --- a/Brilliance Datapack/data/do2/functions/random_gen/get_random_num.mcfunction +++ /dev/null @@ -1,13 +0,0 @@ -tag @e[tag=RandomGenerator_Using] remove RandomGenerator_Using -tag @e[tag=RandomGenerator_0] add RandomGenerator_Using -tag @e[tag=RandomGenerator_1] add RandomGenerator_Using -tag @e[tag=RandomGenerator_2] add RandomGenerator_Using -tag @e[tag=RandomGenerator_3] add RandomGenerator_Using -tag @e[tag=RandomGenerator_4] add RandomGenerator_Using -tag @e[tag=RandomGenerator_5] add RandomGenerator_Using -tag @e[tag=RandomGenerator_6] add RandomGenerator_Using -tag @e[tag=RandomGenerator_7] add RandomGenerator_Using -tag @e[tag=RandomGenerator_8] add RandomGenerator_Using -tag @e[tag=RandomGenerator_9] add RandomGenerator_Using -scoreboard players set @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum 0 -scoreboard players operation @e[type=marker,tag=RandomGenerator_RESULT] do2.utility.randomNum += @e[type=marker,tag=RandomGenerator_Using,limit=1,sort=random] do2.utility.randomNum diff --git a/Brilliance Datapack/data/do2/functions/random_gen/random_setup.mcfunction b/Brilliance Datapack/data/do2/functions/random_gen/random_setup.mcfunction deleted file mode 100644 index d2f37763..00000000 --- a/Brilliance Datapack/data/do2/functions/random_gen/random_setup.mcfunction +++ /dev/null @@ -1,63 +0,0 @@ -kill @e[type=marker,tag=RandomGenerator] -# - RandomGenerator_Bool ( For deciding fish variant size ) -# Generated random number 0 - 1 -# - RandomGenerator_To6 ( For deciding fish variant pattern ) -# Generated random number 0 - 5 -# - RandomGenerator_ToTen ( For most random nums ) -# Generated random number 0 - 9 -# - RandomGenerator_To16 ( For deciding fish variant colors ) -# Generated random number 0 - 15 -# - RandomGenerator_To22 ( For deciding COMMON fish types ) -# Generated random number 0 - 21 - - -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_0"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_1"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_2"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_3"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_4"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_5"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_6"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_7"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_8"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_9"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_10"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_11"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_12"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_13"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_14"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_15"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_16"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_17"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_18"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_19"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_20"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_21"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_100"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_256"]} -summon minecraft:marker -524 115 1982 {Tags:["RandomGenerator", "RandomGenerator_RESULT"]} - -scoreboard players set @e[type=marker,tag=RandomGenerator_0] do2.utility.randomNum 0 -scoreboard players set @e[type=marker,tag=RandomGenerator_1] do2.utility.randomNum 1 -scoreboard players set @e[type=marker,tag=RandomGenerator_2] do2.utility.randomNum 2 -scoreboard players set @e[type=marker,tag=RandomGenerator_3] do2.utility.randomNum 3 -scoreboard players set @e[type=marker,tag=RandomGenerator_4] do2.utility.randomNum 4 -scoreboard players set @e[type=marker,tag=RandomGenerator_5] do2.utility.randomNum 5 -scoreboard players set @e[type=marker,tag=RandomGenerator_6] do2.utility.randomNum 6 -scoreboard players set @e[type=marker,tag=RandomGenerator_7] do2.utility.randomNum 7 -scoreboard players set @e[type=marker,tag=RandomGenerator_8] do2.utility.randomNum 8 -scoreboard players set @e[type=marker,tag=RandomGenerator_9] do2.utility.randomNum 9 -scoreboard players set @e[type=marker,tag=RandomGenerator_10] do2.utility.randomNum 10 -scoreboard players set @e[type=marker,tag=RandomGenerator_11] do2.utility.randomNum 11 -scoreboard players set @e[type=marker,tag=RandomGenerator_12] do2.utility.randomNum 12 -scoreboard players set @e[type=marker,tag=RandomGenerator_13] do2.utility.randomNum 13 -scoreboard players set @e[type=marker,tag=RandomGenerator_14] do2.utility.randomNum 14 -scoreboard players set @e[type=marker,tag=RandomGenerator_15] do2.utility.randomNum 15 -scoreboard players set @e[type=marker,tag=RandomGenerator_16] do2.utility.randomNum 16 -scoreboard players set @e[type=marker,tag=RandomGenerator_17] do2.utility.randomNum 17 -scoreboard players set @e[type=marker,tag=RandomGenerator_18] do2.utility.randomNum 18 -scoreboard players set @e[type=marker,tag=RandomGenerator_19] do2.utility.randomNum 19 -scoreboard players set @e[type=marker,tag=RandomGenerator_20] do2.utility.randomNum 20 -scoreboard players set @e[type=marker,tag=RandomGenerator_21] do2.utility.randomNum 21 -scoreboard players set @e[type=marker,tag=RandomGenerator_100] do2.utility.randomNum 100 -scoreboard players set @e[type=marker,tag=RandomGenerator_256] do2.utility.randomNum 256 diff --git a/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction b/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction index 8e9c4626..c75c6acc 100644 --- a/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction +++ b/Brilliance Datapack/data/do2/functions/scoreboard/setup/utility.mcfunction @@ -1,6 +1,7 @@ scoreboard objectives add do2.utility.deathCount deathCount "Check whether player has died." scoreboard objectives add do2.utility.playerCount dummy "How many players are in the server" scoreboard objectives add do2.utility.randomNum dummy "Random Number Generator" +scoreboard objectives add do2.utility.randomNumberRange dummy "Limit of how high the random number can go." scoreboard objectives add do2.utility.currentTick dummy "The current tick number." scoreboard objectives add do2.utility.checkTick dummy "Used for checking ticks." scoreboard objectives add do2.utility.advancementOrdering dummy "Boolean on whether the advancements are being revoked and granted per tick."