Skip to content

Commit

Permalink
šŸ› ā™»ļø move all active player root tag info under single execution instā€¦
Browse files Browse the repository at this point in the history
ā€¦ance
  • Loading branch information
TheAfroOfDoom committed Oct 25, 2024
1 parent 048fc14 commit 8303467
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8303467

Please sign in to comment.