diff --git a/data/neun_einser.timer/functions/internal/init.mcfunction b/data/neun_einser.timer/functions/internal/init.mcfunction index a99b1e00..2fd8e79c 100644 --- a/data/neun_einser.timer/functions/internal/init.mcfunction +++ b/data/neun_einser.timer/functions/internal/init.mcfunction @@ -93,14 +93,29 @@ scoreboard objectives add 91.timer.main dummy #declare score_holder $hours #> -# This scoreboard is used to store constant values. +# Internal scoreboard for non-temporary memory # # @internal -scoreboard objectives add 91.timer.const dummy +scoreboard objectives add 91.timer.intern dummy #> # @internal #declare score_holder 60 -scoreboard players set 60 91.timer.const 60 +scoreboard players set 60 91.timer.intern 60 + +#> +# Raw time the world border was started at. The world border is reset once it +# reaches a certain threshold to prevent it running out of blocks. +# @internal +#declare score_holder $start +#> +# Blocks the world border travels per second. Used for some internal +# calculations. +# +# For example, if this was started with neun_einser.timer:start/millis, this +# will be 1000. +# +# @internal +#declare score_holder $blocks_per_second data merge storage neun_einser.timer:display {"hh:mm:ss.s": '[{"storage": "neun_einser.timer:display", "nbt": "internal.hours", "interpret": true}, {"storage": "neun_einser.timer:display", "nbt": "internal.minutes", "interpret": true}, {"storage": "neun_einser.timer:display", "nbt": "internal.seconds", "interpret": true}, {"storage": "neun_einser.timer:display", "nbt": "internal.millis", "interpret": true}]', "hh:mm:ss": '[{"storage": "neun_einser.timer:display", "nbt": "internal.hours", "interpret": true}, {"storage": "neun_einser.timer:display", "nbt": "internal.minutes", "interpret": true}, {"storage": "neun_einser.timer:display", "nbt": "internal.seconds", "interpret": true}]', "hh:mm": '[{"storage": "neun_einser.timer:display", "nbt": "internal.hours", "interpret": true}, {"storage": "neun_einser.timer:display", "nbt": "internal.minutes", "interpret": true}]'} \ No newline at end of file diff --git a/data/neun_einser.timer/functions/read.mcfunction b/data/neun_einser.timer/functions/read.mcfunction index 5760a917..653f05cc 100644 --- a/data/neun_einser.timer/functions/read.mcfunction +++ b/data/neun_einser.timer/functions/read.mcfunction @@ -4,10 +4,10 @@ scoreboard players operation $millis 91.timer.main = $raw 91.timer.main scoreboard players operation $seconds 91.timer.main = $millis 91.timer.main scoreboard players operation $seconds 91.timer.main /= $blocks_per_second 91.timer.main scoreboard players operation $minutes 91.timer.main = $seconds 91.timer.main -scoreboard players operation $minutes 91.timer.main /= 60 91.timer.const +scoreboard players operation $minutes 91.timer.main /= 60 91.timer.intern scoreboard players operation $hours 91.timer.main = $minutes 91.timer.main -scoreboard players operation $hours 91.timer.main /= 60 91.timer.const +scoreboard players operation $hours 91.timer.main /= 60 91.timer.intern scoreboard players operation $millis 91.timer.main %= $blocks_per_second 91.timer.main -scoreboard players operation $seconds 91.timer.main %= 60 91.timer.const -scoreboard players operation $minutes 91.timer.main %= 60 91.timer.const \ No newline at end of file +scoreboard players operation $seconds 91.timer.main %= 60 91.timer.intern +scoreboard players operation $minutes 91.timer.main %= 60 91.timer.intern \ No newline at end of file