mcfstd/data/z_/function/debug/display/interval.mcfunction
vlw c4195baf85 refactor: bundle mcfstd as a datapack (#1)
So it turns out it will be much harder to create namespaced instances of this datapack like we initially thought. It might be worth considering in the future, but we would not be able to use any functions that we add with this library by the library itself, since the namespace change will make all internal function calls point to an undefined target. So we will bundle this as a datapack for now.

Reviewed-on: https://codeberg.org/vlw/mcfstd/pulls/1
Co-authored-by: vlw <victor@vlw.se>
Co-committed-by: vlw <victor@vlw.se>
2026-03-13 20:02:31 +01:00

11 lines
598 B
MCFunction

#> Alternate sidebar display between register and variable scoreboards
function z_:construct
schedule function z_:debug/display/interval 3s replace
execute if score _mcfstd_debug_display _mcfstd_var matches 0 run function z_:debug/display/var
execute if score _mcfstd_debug_display _mcfstd_var matches 1 run function z_:debug/display/reg
execute if score _mcfstd_debug_display _mcfstd_var matches 0 run return run function var:set { k: _mcfstd_debug_display, v: 1 }
execute if score _mcfstd_debug_display _mcfstd_var matches 1 run return run function var:set { k: _mcfstd_debug_display, v: 0 }