From 70f3010fd3e7c5a185e07443b18d8a8086413f39 Mon Sep 17 00:00:00 2001 From: _Nik0__ Date: Wed, 28 Feb 2024 19:22:15 +0100 Subject: [PATCH] DP | Rollback Changes --- .../functions/__tick__.mcfunction | 2 +- .../functions/call_bots.mcfunction | 3 +- .../nnb_spawnsystem/functions/root.mcfunction | 2 +- nnb_spawnsystem/main.jmc | 32 +++++++++---------- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/nnb_spawnsystem/data/nnb_spawnsystem/functions/__tick__.mcfunction b/nnb_spawnsystem/data/nnb_spawnsystem/functions/__tick__.mcfunction index ceb5e95..1c3ed5c 100644 --- a/nnb_spawnsystem/data/nnb_spawnsystem/functions/__tick__.mcfunction +++ b/nnb_spawnsystem/data/nnb_spawnsystem/functions/__tick__.mcfunction @@ -1,2 +1,2 @@ -function nnb_spawnsystem:map_detect +function nnb_spawnsystem:root map_detect() execute if score started nn_lobby matches 1 run function nnb_spawnsystem:timer_msec \ No newline at end of file diff --git a/nnb_spawnsystem/data/nnb_spawnsystem/functions/call_bots.mcfunction b/nnb_spawnsystem/data/nnb_spawnsystem/functions/call_bots.mcfunction index cdbdead..d799f44 100644 --- a/nnb_spawnsystem/data/nnb_spawnsystem/functions/call_bots.mcfunction +++ b/nnb_spawnsystem/data/nnb_spawnsystem/functions/call_bots.mcfunction @@ -4,5 +4,4 @@ execute store result storage nnb_spawnsystem:temp limit int 1 run scoreboard pla execute store result storage nnb_spawnsystem:__storage__ switch_key int 1 run scoreboard players get spawn nn_spawn function nnb_spawnsystem:__private__/switch_case/1/select with storage nnb_spawnsystem:__storage__ scoreboard players remove ticks nn_spawn 1 -execute if score ticks nn_spawn matches ..9 run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp -function nnb_spawnsystem:root with storage nnb_spawnsystem:temp \ No newline at end of file +execute if score ticks nn_spawn matches ..9 run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp \ No newline at end of file diff --git a/nnb_spawnsystem/data/nnb_spawnsystem/functions/root.mcfunction b/nnb_spawnsystem/data/nnb_spawnsystem/functions/root.mcfunction index f5de188..ed45c97 100644 --- a/nnb_spawnsystem/data/nnb_spawnsystem/functions/root.mcfunction +++ b/nnb_spawnsystem/data/nnb_spawnsystem/functions/root.mcfunction @@ -1 +1 @@ -execute if score phase nn_lobby matches 5 if score min nn_lobby >= 0 nn_lobby run $bossbar set minecraft:game name [{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},{"text":" |","color":"dark_gray"},{"text":" Playing $(map)","color":"aqua"}] \ No newline at end of file +execute if score phase nn_lobby matches 5 if score min nn_lobby >= 0 nn_lobby run bossbar set minecraft:game name [{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},{"text":" |","color":"dark_gray"},{"text":" Playing ","color":"aqua"},{"selector":"@e[tag=now_playing]","color":"gold"}] \ No newline at end of file diff --git a/nnb_spawnsystem/main.jmc b/nnb_spawnsystem/main.jmc index 6595702..43c4dc9 100644 --- a/nnb_spawnsystem/main.jmc +++ b/nnb_spawnsystem/main.jmc @@ -3,6 +3,7 @@ Text.tellraw(@a, "Spawn System Loaded"); // Run Every Tick function __tick__() { +root() map_detect(); @@ -12,7 +13,20 @@ timer_msec(); +// Bossbar & Entity Stuff +function root() { + //Detect if round has started + if (nn_lobby:phase = 5) { + // check if minutes are not less than 0 + if (nn_lobby:min >= nn_lobby:0) { + // Set the bossbar stuff + bossbar set minecraft:game name [ + {"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"}, + {"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"}, + {"text":" |","color":"dark_gray"},{"text":" Playing ","color":"aqua"},{"selector":"@e[tag=now_playing]","color":"gold"}]; + +}}} @@ -213,10 +227,7 @@ function call_bots() { scoreboard players remove ticks nn_spawn 1; if (nn_spawn:ticks < 10) { setup_bots() with storage nnb_spawnsystem:temp; -} -// Tick the bossbar with the correct info -root() with storage nnb_spawnsystem:temp; -} +}} // Universal spawn bot stuff function setup_bots() { @@ -249,20 +260,7 @@ function tp_bots() { -// Bossbar & Entity Stuff -function root() { - - //Detect if round has started - if (nn_lobby:phase = 5) { - // check if minutes are not less than 0 - if (nn_lobby:min >= nn_lobby:0) { - // Set the bossbar stuff - $bossbar set minecraft:game name [ - {"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"}, - {"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"}, - {"text":" |","color":"dark_gray"},{"text":" Playing $(map)","color":"aqua"}]; -}}}