
# -> Rotate perm marker
execute rotated as @s run \
    rotate 00000001-0000-002a-0000-00010000002a ~ ~

# -> Get rotation
execute store result score #or.global OverlyRealistic.General.ArbitraryData run \
    data get entity 00000001-0000-002a-0000-00010000002a Rotation[0]

# --> Set rotation data

#tellraw @a [{score:{name:"#or.global",objective:"OverlyRealistic.General.ArbitraryData"}}]
      
# -> South
execute if score #or.global OverlyRealistic.General.ArbitraryData matches -45..45 run \
    return run \
        title @s actionbar [{"color":"#5BA34D","text":"☀ Heat: "},{"color":"#5BA34D","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Temperature"}},{"color":"#5BA34D","text":"%  "},{"color":"#49A3A3","text":"⚡ Stamina: "},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Stamina"}},{"color":"#49A3A3","text":"/"},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.MaxStamina"}},{"color":"#4B51A3","text":"  🧪 Thirst: "},{"color":"#4B51A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Thirst"}},{"color":"#4B51A3","text":"%"},{"color":"#C263BF","text":"  ❤ Status: "},{"color":"#C263BF","nbt":"player_status","storage":"overly_realistic:player_stats"},{"color":"#AD0C0C","text":" ℹ S"}]

# -> East
execute if score #or.global OverlyRealistic.General.ArbitraryData matches -134..-44 run \
    return run \
        title @s actionbar [{"color":"#5BA34D","text":"☀ Heat: "},{"color":"#5BA34D","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Temperature"}},{"color":"#5BA34D","text":"%  "},{"color":"#49A3A3","text":"⚡ Stamina: "},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Stamina"}},{"color":"#49A3A3","text":"/"},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.MaxStamina"}},{"color":"#4B51A3","text":"  🧪 Thirst: "},{"color":"#4B51A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Thirst"}},{"color":"#4B51A3","text":"%"},{"color":"#C263BF","text":"  ❤ Status: "},{"color":"#C263BF","nbt":"player_status","storage":"overly_realistic:player_stats"},{"color":"#AD0C0C","text":" ℹ E"}]

# -> West
execute if score #or.global OverlyRealistic.General.ArbitraryData matches 46..134 run \
    return run \
        title @s actionbar [{"color":"#5BA34D","text":"☀ Heat: "},{"color":"#5BA34D","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Temperature"}},{"color":"#5BA34D","text":"%  "},{"color":"#49A3A3","text":"⚡ Stamina: "},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Stamina"}},{"color":"#49A3A3","text":"/"},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.MaxStamina"}},{"color":"#4B51A3","text":"  🧪 Thirst: "},{"color":"#4B51A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Thirst"}},{"color":"#4B51A3","text":"%"},{"color":"#C263BF","text":"  ❤ Status: "},{"color":"#C263BF","nbt":"player_status","storage":"overly_realistic:player_stats"},{"color":"#AD0C0C","text":" ℹ W"}]

# -> North
title @s actionbar [{"color":"#5BA34D","text":"☀ Heat: "},{"color":"#5BA34D","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Temperature"}},{"color":"#5BA34D","text":"%  "},{"color":"#49A3A3","text":"⚡ Stamina: "},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Stamina"}},{"color":"#49A3A3","text":"/"},{"color":"#49A3A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.MaxStamina"}},{"color":"#4B51A3","text":"  🧪 Thirst: "},{"color":"#4B51A3","score":{"name":"@s","objective":"OverlyRealistic.Player.Stats.Thirst"}},{"color":"#4B51A3","text":"%"},{"color":"#C263BF","text":"  ❤ Status: "},{"color":"#C263BF","nbt":"player_status","storage":"overly_realistic:player_stats"},{"color":"#AD0C0C","text":" ℹ N"}]
