From 83034670b7adc2d263b081c00afe6dc130236c60 Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Fri, 25 Oct 2024 00:49:23 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E2=99=BB=EF=B8=8F=20move=20all?= =?UTF-8?q?=20active=20player=20root=20tag=20info=20under=20single=20execu?= =?UTF-8?q?tion=20instance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../telemetry/bossfight/tag/root/start.mcfunction | 4 ---- .../bossfight/tag/root/start/as_active_player.mcfunction | 5 +++++ .../telemetry/data/active_player/gamemode.mcfunction | 9 +-------- .../active_player/gamemode/as_active_player.mcfunction | 8 ++++++++ 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode/as_active_player.mcfunction diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start.mcfunction index 853fb85c..303ad41b 100644 --- a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start.mcfunction @@ -14,11 +14,7 @@ execute store result storage omegaflowey:telemetry temp.bossfight_root_next.tick execute summon marker run function omegaflowey.main:telemetry/bossfight/tag/root/start/generate_uuid -function omegaflowey.main:telemetry/bossfight/tag/root/start/get_player_id - function omegaflowey.main:telemetry/bossfight/tag/root/start/macro with storage omegaflowey:bossfight -function omegaflowey.main:telemetry/data/active_player/gamemode with storage omegaflowey:bossfight -data modify storage omegaflowey:telemetry temp.bossfight_root_next.player_gamemode set from storage omegaflowey:telemetry temp.data.g function omegaflowey.main:telemetry/bossfight/tag/root/start/to_string with storage omegaflowey:telemetry temp.bossfight_root_next function omegaflowey.main:telemetry/bossfight/tag/update_page_length diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start/as_active_player.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start/as_active_player.mcfunction index 19565467..2cb3b779 100644 --- a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start/as_active_player.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/bossfight/tag/root/start/as_active_player.mcfunction @@ -1 +1,6 @@ +function omegaflowey.main:telemetry/bossfight/tag/root/start/get_player_id + data modify storage omegaflowey:telemetry temp.bossfight_root_next.player_health set from entity @s Health + +function omegaflowey.main:telemetry/data/active_player/gamemode/as_active_player +data modify storage omegaflowey:telemetry temp.bossfight_root_next.player_gamemode set from storage omegaflowey:telemetry temp.data.g diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode.mcfunction index b508079c..369d4ec5 100644 --- a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode.mcfunction @@ -1,10 +1,3 @@ function omegaflowey.main:telemetry/data/shared -$execute as $(active_player_uuid) if entity @s[gamemode=survival] run \ - data modify storage omegaflowey:telemetry temp.data.g set value 0 -$execute as $(active_player_uuid) if entity @s[gamemode=creative] run \ - data modify storage omegaflowey:telemetry temp.data.g set value 1 -$execute as $(active_player_uuid) if entity @s[gamemode=adventure] run \ - data modify storage omegaflowey:telemetry temp.data.g set value 2 -$execute as $(active_player_uuid) if entity @s[gamemode=spectator] run \ - data modify storage omegaflowey:telemetry temp.data.g set value 3 +$execute as $(active_player_uuid) run function omegaflowey.main:telemetry/data/active_player/gamemode/as_active_player diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode/as_active_player.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode/as_active_player.mcfunction new file mode 100644 index 00000000..dc9a7ca9 --- /dev/null +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/telemetry/data/active_player/gamemode/as_active_player.mcfunction @@ -0,0 +1,8 @@ +execute if entity @s[gamemode=survival] run return run \ + data modify storage omegaflowey:telemetry temp.data.g set value 0 +execute if entity @s[gamemode=creative] run return run \ + data modify storage omegaflowey:telemetry temp.data.g set value 1 +execute if entity @s[gamemode=adventure] run return run \ + data modify storage omegaflowey:telemetry temp.data.g set value 2 +execute if entity @s[gamemode=spectator] run return run \ + data modify storage omegaflowey:telemetry temp.data.g set value 3