-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Levels 1 & 2 now use the new mob controller.
- Loading branch information
1 parent
ec75be8
commit 35e2196
Showing
32 changed files
with
381 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
...ance Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_mob.mcfunction
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
... Datapack/data/do2/functions/level_controller/generate_mobs/generate_a_ravager.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
8 changes: 8 additions & 0 deletions
8
...apack/data/do2/functions/level_controller/generate_mobs/get_from_random_number.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
11 changes: 9 additions & 2 deletions
11
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z1.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z2.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z3.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z4.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l1z5.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z1.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z2.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z3.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z4.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
16 changes: 16 additions & 0 deletions
16
Brilliance Datapack/data/do2/functions/level_controller/generate_mobs/l2z5.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
1 change: 0 additions & 1 deletion
1
...Datapack/data/do2/functions/level_controller/get_mob_count/count_inside_barrel.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
scoreboard players set $dungeon do2.utility.mobCountCounterTotal 0 | ||
|
||
# Count each slot | ||
|
3 changes: 2 additions & 1 deletion
3
Brilliance Datapack/data/do2/functions/level_controller/get_mob_count/count_mobs.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.