From 67687a796e9f324c7a5c8153d5b9a1eb51ded983 Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Sun, 20 Oct 2024 03:50:38 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88=20telemetry:=20add=20function=20to?= =?UTF-8?q?=20append=20extra=20data=20to=20latest=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boss_fight/summit/phase/attack/initialize.mcfunction | 3 +++ .../boss_fight/summit/phase/soul/initialize.mcfunction | 3 +++ .../boss_fight/summit/phase/warn/initialize.mcfunction | 3 +++ .../function/telemetry/tag/shared.mcfunction | 6 ++++++ 4 files changed, 15 insertions(+) diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/attack/initialize.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/attack/initialize.mcfunction index cb0184160..2c43d78b3 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/attack/initialize.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/attack/initialize.mcfunction @@ -1,3 +1,6 @@ +data modify storage omegaflowey:telemetry.temp data set value {} +execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \ + scoreboard players get @s omegaflowey.boss-fight.attack.phase.i function omegaflowey.main:telemetry/tag/start { name: "bossfight.phase.attack" } # Split on phase score diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/soul/initialize.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/soul/initialize.mcfunction index f4392c531..46ddf49a8 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/soul/initialize.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/soul/initialize.mcfunction @@ -1,3 +1,6 @@ +data modify storage omegaflowey:telemetry.temp data set value {} +execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \ + scoreboard players get @s omegaflowey.boss-fight.progress.phase.i function omegaflowey.main:telemetry/tag/start { name: "bossfight.phase.soul" } ## Set scores diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/warn/initialize.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/warn/initialize.mcfunction index 0c519b66e..25211f53e 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/warn/initialize.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/summit/phase/warn/initialize.mcfunction @@ -1,3 +1,6 @@ +data modify storage omegaflowey:telemetry.temp data set value {} +execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \ + scoreboard players get @s omegaflowey.boss-fight.progress.phase.i function omegaflowey.main:telemetry/tag/start { name: "bossfight.phase.warn" } ## Set scores diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/tag/shared.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/tag/shared.mcfunction index 6bd617ded..afdad18d1 100644 --- a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/tag/shared.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/tag/shared.mcfunction @@ -2,3 +2,9 @@ execute store result score @s omegaflowey.math.0 run time query gametime scoreboard players operation @s omegaflowey.math.0 -= #omegaflowey.telemetry.basetime omegaflowey.global.flag execute store result storage omegaflowey:telemetry tags[-1][-1].tick int 1 run scoreboard players get @s omegaflowey.math.0 + +execute if data storage omegaflowey:telemetry.temp data run \ + data modify storage omegaflowey:telemetry tags[-1][-1].data set from storage omegaflowey:telemetry.temp data + +# reset extra data +data remove storage omegaflowey:telemetry.temp data