## Updates the end force meter UI whenever called.
## Is called from multiple places in code whenever the UI needs to be updated
## @s = a player

## Update it without shaking
tag @s[scores={ShakeTimer=1..}] remove ShakeMeter
titleraw @s[tag=!ShakeMeter] title { "rawtext": [ { "text": "current:" }, { "score": {"name": "@s", "objective": "DisplayCurrForce" } }, { "text": ";previous:" }, { "score": {"name": "@s", "objective": "DisplayPrevForce" } }, { "text": ";" } ] }

## Update and play a shake animation
titleraw @s[tag=ShakeMeter,scores={ShakeTimer=0}] title { "rawtext": [ { "text": "current:" }, { "score": {"name": "@s", "objective": "DisplayCurrForce" } }, { "text": ";previous:" }, { "score": {"name": "@s", "objective": "DisplayPrevForce" } }, { "text": ";shake:true;" } ] }
scoreboard players set @s[tag=ShakeMeter] ShakeTimer 3
tag @s remove ShakeMeter