diff --git a/1_20_3/data/datalib/functions/core/tick/admin_systems.mcfunction b/1_20_3/data/datalib/functions/core/tick/admin_systems.mcfunction index b8c8b74..9002a87 100644 --- a/1_20_3/data/datalib/functions/core/tick/admin_systems.mcfunction +++ b/1_20_3/data/datalib/functions/core/tick/admin_systems.mcfunction @@ -1,4 +1,4 @@ tag @a[tag=datalib.admin] add datalib.debug -scoreboard players enable @a[tag=datalib.admin] dl_menu +scoreboard players enable @a[tag=datalib.admin] datalib_menu scoreboard players enable @a[tag=datalib.admin] dl_action scoreboard players enable @a[tag=datalib.admin] dl_run diff --git a/1_20_3/data/datalib/functions/core/tick/player_systems.mcfunction b/1_20_3/data/datalib/functions/core/tick/player_systems.mcfunction index f0323c6..618e8e9 100644 --- a/1_20_3/data/datalib/functions/core/tick/player_systems.mcfunction +++ b/1_20_3/data/datalib/functions/core/tick/player_systems.mcfunction @@ -1,8 +1,8 @@ execute as @a run function datalib:core/lib/tick_guard_clear -execute as @a[scores={dl_menu=1..}] run function datalib:menu -scoreboard players set @a[scores={dl_menu=1..}] dl_menu 0 -scoreboard players enable @a[scores={dl_menu=-1..}] dl_menu +execute as @a[scores={datalib_menu=1..}] run function datalib:menu +scoreboard players set @a[scores={datalib_menu=1..}] datalib_menu 0 +scoreboard players enable @a[scores={datalib_menu=-1..}] datalib_menu execute as @a[scores={dl_run=1..}] run function #datalib:admin/run scoreboard players set @a[scores={dl_run=1..}] dl_run 0 diff --git a/1_20_3/data/dl_load/functions/load/internal/cleanup.mcfunction b/1_20_3/data/dl_load/functions/load/internal/cleanup.mcfunction index 074167f..92b6c77 100644 --- a/1_20_3/data/dl_load/functions/load/internal/cleanup.mcfunction +++ b/1_20_3/data/dl_load/functions/load/internal/cleanup.mcfunction @@ -3,7 +3,7 @@ schedule clear datalib:core/lib/sync_tick forceload remove -30000000 1600 forceload remove 0 0 -scoreboard players reset @a dl_menu +scoreboard players reset @a datalib_menu scoreboard players reset @a dl_run scoreboard players reset $tick dl.tmp @@ -49,7 +49,7 @@ data remove storage datalib:engine rate_limit scoreboard objectives remove dl.tmp scoreboard objectives remove datalib.time -scoreboard objectives remove dl_menu +scoreboard objectives remove datalib_menu scoreboard objectives remove dl_run scoreboard objectives remove dl_action scoreboard objectives remove datalib.tick_guard diff --git a/1_20_3/data/dl_load/functions/load/other.mcfunction b/1_20_3/data/dl_load/functions/load/other.mcfunction index 92eb93d..97482ca 100644 --- a/1_20_3/data/dl_load/functions/load/other.mcfunction +++ b/1_20_3/data/dl_load/functions/load/other.mcfunction @@ -8,7 +8,7 @@ data remove storage datalib:input func data remove storage datalib:input interval data remove storage datalib:input key -scoreboard players enable @a[tag=datalib.admin] dl_menu +scoreboard players enable @a[tag=datalib.admin] datalib_menu scoreboard players enable @a[tag=datalib.admin] dl_run scoreboard players enable @a[tag=datalib.admin] dl_action diff --git a/1_20_3/data/dl_load/functions/load/scoreboards.mcfunction b/1_20_3/data/dl_load/functions/load/scoreboards.mcfunction index 1d77563..ab7b11f 100644 --- a/1_20_3/data/dl_load/functions/load/scoreboards.mcfunction +++ b/1_20_3/data/dl_load/functions/load/scoreboards.mcfunction @@ -1,6 +1,6 @@ scoreboard objectives add dl.tmp dummy scoreboard objectives add datalib.time dummy -scoreboard objectives add dl_menu trigger +scoreboard objectives add datalib_menu trigger scoreboard objectives add dl_run trigger scoreboard objectives add dl_action trigger scoreboard objectives add datalib.dialog_load dummy @@ -8,6 +8,7 @@ scoreboard objectives add datalib.tick_guard dummy scoreboard objectives add health health {"text":"❤","color":"red"} scoreboard objectives add dl.pre_version dummy scoreboard objectives add datalib.pid dummy +scoreboard objectives add datalib.onlinePlayers dummy # Wand module — carrot_on_a_stick right-click tracker scoreboard objectives add datalib.rightClick minecraft.used:minecraft.carrot_on_a_stick diff --git a/1_20_5/data/datalib/functions/core/tick/admin_systems.mcfunction b/1_20_5/data/datalib/functions/core/tick/admin_systems.mcfunction index 353522b..a6665d4 100644 --- a/1_20_5/data/datalib/functions/core/tick/admin_systems.mcfunction +++ b/1_20_5/data/datalib/functions/core/tick/admin_systems.mcfunction @@ -1,4 +1,4 @@ tag @a[tag=datalib.admin] add datalib.debug -scoreboard players enable @a[tag=datalib.admin] dl_menu +scoreboard players enable @a[tag=datalib.admin] datalib_menu scoreboard players enable @a[tag=datalib.admin] datalib_action scoreboard players enable @a[tag=datalib.admin] datalib_run diff --git a/1_20_5/data/datalib/functions/core/tick/player_systems.mcfunction b/1_20_5/data/datalib/functions/core/tick/player_systems.mcfunction index 080f2a3..4a17596 100644 --- a/1_20_5/data/datalib/functions/core/tick/player_systems.mcfunction +++ b/1_20_5/data/datalib/functions/core/tick/player_systems.mcfunction @@ -1,8 +1,8 @@ execute as @a run function datalib:core/lib/tick_guard_clear -execute as @a[scores={dl_menu=1..}] run function datalib:menu -scoreboard players set @a[scores={dl_menu=1..}] dl_menu 0 -scoreboard players enable @a[scores={dl_menu=-1..}] dl_menu +execute as @a[scores={datalib_menu=1..}] run function datalib:menu +scoreboard players set @a[scores={datalib_menu=1..}] datalib_menu 0 +scoreboard players enable @a[scores={datalib_menu=-1..}] datalib_menu execute as @a[scores={macro_run=1..}] run function #datalib:admin/run scoreboard players set @a[scores={macro_run=1..}] datalib_run 0 diff --git a/1_20_5/data/dl_load/functions/load/internal/cleanup.mcfunction b/1_20_5/data/dl_load/functions/load/internal/cleanup.mcfunction index 15f5443..b888f00 100644 --- a/1_20_5/data/dl_load/functions/load/internal/cleanup.mcfunction +++ b/1_20_5/data/dl_load/functions/load/internal/cleanup.mcfunction @@ -3,7 +3,7 @@ schedule clear datalib:core/lib/sync_tick forceload remove -30000000 1600 forceload remove 0 0 -scoreboard players reset @a dl_menu +scoreboard players reset @a datalib_menu scoreboard players reset @a datalib_run scoreboard players reset $tick dl.tmp @@ -49,7 +49,7 @@ data remove storage datalib:engine rate_limit scoreboard objectives remove dl.tmp scoreboard objectives remove datalib.time -scoreboard objectives remove dl_menu +scoreboard objectives remove datalib_menu scoreboard objectives remove datalib_run scoreboard objectives remove datalib_action scoreboard objectives remove datalib.tick_guard diff --git a/1_20_5/data/dl_load/functions/load/other.mcfunction b/1_20_5/data/dl_load/functions/load/other.mcfunction index cc7e579..d0bdb42 100644 --- a/1_20_5/data/dl_load/functions/load/other.mcfunction +++ b/1_20_5/data/dl_load/functions/load/other.mcfunction @@ -8,7 +8,7 @@ data remove storage datalib:input func data remove storage datalib:input interval data remove storage datalib:input key -scoreboard players enable @a[tag=datalib.admin] dl_menu +scoreboard players enable @a[tag=datalib.admin] datalib_menu scoreboard players enable @a[tag=datalib.admin] datalib_run scoreboard players enable @a[tag=datalib.admin] datalib_action diff --git a/1_20_5/data/dl_load/functions/load/scoreboards.mcfunction b/1_20_5/data/dl_load/functions/load/scoreboards.mcfunction index 1602684..defecef 100644 --- a/1_20_5/data/dl_load/functions/load/scoreboards.mcfunction +++ b/1_20_5/data/dl_load/functions/load/scoreboards.mcfunction @@ -1,6 +1,6 @@ scoreboard objectives add dl.tmp dummy scoreboard objectives add datalib.time dummy -scoreboard objectives add dl_menu trigger +scoreboard objectives add datalib_menu trigger scoreboard objectives add datalib_run trigger scoreboard objectives add datalib_action trigger scoreboard objectives add datalib.dialog_load dummy @@ -9,6 +9,7 @@ scoreboard objectives add health health {"text":"❤","color":"red"} scoreboard objectives add dl.pre_version dummy scoreboard objectives add datalib.pid dummy scoreboard objectives add dl.freeze_id dummy +scoreboard objectives add datalib.onlinePlayers dummy # Wand module — carrot_on_a_stick right-click tracker scoreboard objectives add datalib.rightClick minecraft.used:minecraft.carrot_on_a_stick diff --git a/1_21_5/data/datalib/function/core/tick/player_systems.mcfunction b/1_21_5/data/datalib/function/core/tick/player_systems.mcfunction index 311c9b0..ab657f1 100644 --- a/1_21_5/data/datalib/function/core/tick/player_systems.mcfunction +++ b/1_21_5/data/datalib/function/core/tick/player_systems.mcfunction @@ -1,6 +1,6 @@ -execute as @a[scores={dl_menu=1..}] run function datalib:menu -scoreboard players set @a[scores={dl_menu=1..}] dl_menu 0 -scoreboard players enable @a[scores={dl_menu=-1..}] dl_menu +execute as @a[scores={datalib_menu=1..}] run function datalib:menu +scoreboard players set @a[scores={datalib_menu=1..}] datalib_menu 0 +scoreboard players enable @a[scores={datalib_menu=-1..}] datalib_menu execute as @a[scores={dl_run=1..}] run function #datalib:run scoreboard players set @a[scores={dl_run=1..}] dl_run 0 diff --git a/1_21_6/data/datalib/function/core/tick/player_systems.mcfunction b/1_21_6/data/datalib/function/core/tick/player_systems.mcfunction index 3adf13d..d02b6fd 100644 --- a/1_21_6/data/datalib/function/core/tick/player_systems.mcfunction +++ b/1_21_6/data/datalib/function/core/tick/player_systems.mcfunction @@ -1,6 +1,6 @@ -execute as @a[scores={dl_menu=1..}] run function datalib:menu -scoreboard players set @a[scores={dl_menu=1..}] dl_menu 0 -scoreboard players enable @a[scores={dl_menu=-1..}] dl_menu +execute as @a[scores={datalib_menu=1..}] run function datalib:menu +scoreboard players set @a[scores={datalib_menu=1..}] datalib_menu 0 +scoreboard players enable @a[scores={datalib_menu=-1..}] datalib_menu execute as @a[scores={dl_run=1..}] run function #datalib:run scoreboard players set @a[scores={dl_run=1..}] dl_run 0 diff --git a/_pre_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction b/_pre_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction index ecbc6dd..1f3d31c 100644 --- a/_pre_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction +++ b/_pre_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction @@ -18,5 +18,5 @@ # function datalib:api/wand/give_custom with storage datalib:input {} # ───────────────────────────────────────────────────────────────── -$give @a[name=$(player),limit=1] minecraft:carrot_on_a_stick[minecraft:custom_data={wand:"$(tag)"},minecraft:item_name='{"text":"$(name)"}',minecraft:enchantment_glint_override=true] $(count) +$give @a[name=$(player),limit=1] minecraft:carrot_on_a_stick[minecraft:custom_data={wand:"$(tag)"},minecraft:item_name='{"text":"$(name)"}',minecraft:enchantment_glint_override=$(enchantmentGlintOverride)] $(count) $tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"wand/give_custom ","color":"aqua"},{"text":"$(player)","color":"white"},{"text":" → ","color":"#555555"},{"text":"$(item)","color":"aqua"},{"text":" [$(tag)]","color":"#555555"}] diff --git a/compat_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction b/compat_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction deleted file mode 100644 index ecbc6dd..0000000 --- a/compat_1_21_4/data/datalib/function/api/wand /give_custom.mcfunction +++ /dev/null @@ -1,22 +0,0 @@ -# ───────────────────────────────────────────────────────────────── -# datalib:api/wand/give_custom -# Gives a custom item tagged as a wand. -# Any item type can be used (sword, stick, etc.) -# but right-click only works with carrot_on_a_stick. -# -# INPUT: -# $(player) → target player -# $(tag) → wand tag -# $(name) → item name (JSON text string) -# $(count) → quantity (default 1) -# -# EXAMPLE: -# data modify storage datalib:input player set value "Steve" -# data modify storage datalib:input tag set value "ice_wand" -# data modify storage datalib:input name set value "Ice Wand" -# data modify storage datalib:input count set value 1 -# function datalib:api/wand/give_custom with storage datalib:input {} -# ───────────────────────────────────────────────────────────────── - -$give @a[name=$(player),limit=1] minecraft:carrot_on_a_stick[minecraft:custom_data={wand:"$(tag)"},minecraft:item_name='{"text":"$(name)"}',minecraft:enchantment_glint_override=true] $(count) -$tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"wand/give_custom ","color":"aqua"},{"text":"$(player)","color":"white"},{"text":" → ","color":"#555555"},{"text":"$(item)","color":"aqua"},{"text":" [$(tag)]","color":"#555555"}] diff --git a/compat_1_21_4/data/datalib/function/api/wand/give_custom.mcfunction b/compat_1_21_4/data/datalib/function/api/wand/give_custom.mcfunction index 9456b74..1f3d31c 100644 --- a/compat_1_21_4/data/datalib/function/api/wand/give_custom.mcfunction +++ b/compat_1_21_4/data/datalib/function/api/wand/give_custom.mcfunction @@ -1,7 +1,22 @@ -# datalib:api/wand/give_custom [compat_1_21_4 overlay — pack_format 48–61] -# 1.21.4 and below: item_name uses legacy ' string syntax. +# ───────────────────────────────────────────────────────────────── +# datalib:api/wand/give_custom +# Gives a custom item tagged as a wand. +# Any item type can be used (sword, stick, etc.) +# but right-click only works with carrot_on_a_stick. # -# INPUT: $(player), $(item), $(tag), $(name), $(count) +# INPUT: +# $(player) → target player +# $(tag) → wand tag +# $(name) → item name (JSON text string) +# $(count) → quantity (default 1) +# +# EXAMPLE: +# data modify storage datalib:input player set value "Steve" +# data modify storage datalib:input tag set value "ice_wand" +# data modify storage datalib:input name set value "Ice Wand" +# data modify storage datalib:input count set value 1 +# function datalib:api/wand/give_custom with storage datalib:input {} +# ───────────────────────────────────────────────────────────────── -$give @a[name=$(player),limit=1] $(item)[minecraft:custom_data={wand:"$(tag)"},minecraft:item_name='"$(name)"',minecraft:enchantment_glint_override=true] $(count) +$give @a[name=$(player),limit=1] minecraft:carrot_on_a_stick[minecraft:custom_data={wand:"$(tag)"},minecraft:item_name='{"text":"$(name)"}',minecraft:enchantment_glint_override=$(enchantmentGlintOverride)] $(count) $tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"wand/give_custom ","color":"aqua"},{"text":"$(player)","color":"white"},{"text":" → ","color":"#555555"},{"text":"$(item)","color":"aqua"},{"text":" [$(tag)]","color":"#555555"}] diff --git a/data/datalib/function/core/handle_trigger.mcfunction b/data/datalib/function/core/handle_trigger.mcfunction new file mode 100644 index 0000000..6239a24 --- /dev/null +++ b/data/datalib/function/core/handle_trigger.mcfunction @@ -0,0 +1,4 @@ +#> Handle datalib_settingsBook +execute if score @s datalib_settingsBook matches 1.. run function datalib:systems/dev_settings/display/open +scoreboard players set @s datalib_settingsBook 0 +scoreboard players enable @s datalib_settingsBook \ No newline at end of file diff --git a/data/datalib/function/core/tick.mcfunction b/data/datalib/function/core/tick.mcfunction index 3755846..8aa490b 100644 --- a/data/datalib/function/core/tick.mcfunction +++ b/data/datalib/function/core/tick.mcfunction @@ -16,4 +16,6 @@ execute store result score #online datalib.onlinePlayers if entity @a # Guard: globally paused (datalib:core/tick/pause / datalib:core/tick/resume) execute if data storage datalib:engine tick{paused:1b} run return 0 -execute as @a run function datalib:core/tick/dispatch \ No newline at end of file +execute as @a run function datalib:core/tick/dispatch + +execute as @a[scores={datalib_settingsBook=1..}] at @s run function datalib:core/handle_trigger \ No newline at end of file diff --git a/data/datalib/function/core/tick/admin_systems.mcfunction b/data/datalib/function/core/tick/admin_systems.mcfunction index 603f68e..555aae2 100644 --- a/data/datalib/function/core/tick/admin_systems.mcfunction +++ b/data/datalib/function/core/tick/admin_systems.mcfunction @@ -1,5 +1,5 @@ tag @a[tag=datalib.admin] add datalib.debug -scoreboard players enable @a[tag=datalib.admin] dl_menu +scoreboard players enable @a[tag=datalib.admin] datalib_menu scoreboard players enable @a[tag=datalib.admin] dl_action scoreboard players enable @a[tag=datalib.admin] dl_run function datalib:systems/geo/region_watch/internal/tick_scan diff --git a/data/datalib/function/core/tick/player_systems.mcfunction b/data/datalib/function/core/tick/player_systems.mcfunction index fd0c230..c08af52 100644 --- a/data/datalib/function/core/tick/player_systems.mcfunction +++ b/data/datalib/function/core/tick/player_systems.mcfunction @@ -1,8 +1,8 @@ execute as @a run function datalib:core/lib/tick_guard_clear -execute as @a[scores={dl_menu=1..}] run function datalib:menu -scoreboard players set @a[scores={dl_menu=1..}] dl_menu 0 -scoreboard players enable @a[scores={dl_menu=-1..}] dl_menu +execute as @a[scores={datalib_menu=1..}] run function datalib:menu +scoreboard players set @a[scores={datalib_menu=1..}] datalib_menu 0 +scoreboard players enable @a[scores={datalib_menu=-1..}] datalib_menu execute as @a[scores={dl_run=1..}] run function #datalib:admin/run scoreboard players set @a[scores={dl_run=1..}] dl_run 0 diff --git a/data/datalib/function/systems/dev_settings/display/page/devmode.mcfunction b/data/datalib/function/systems/dev_settings/display/page/devmode.mcfunction index ec329a6..fb65464 100644 --- a/data/datalib/function/systems/dev_settings/display/page/devmode.mcfunction +++ b/data/datalib/function/systems/dev_settings/display/page/devmode.mcfunction @@ -3,8 +3,8 @@ execute store result score #dl.dsm dl.tmp run data get storage datalib:engine dev_settings.devMode -execute if score #dl.dsm dl.tmp matches 1 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[devMode]","color":"#2DD158","hoverEvent":{"action":"show_text","value":[{"text":"Status: Enabled"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/toggle_devmode"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute if score #dl.dsm dl.tmp matches 1 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[devMode]","color":"#2DD158","hover_event":{"action":"show_text","value":[{"text":"Status: Enabled"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/toggle_devmode"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] -execute unless score #dl.dsm dl.tmp matches 1 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[devMode]","color":"#D12D60","hoverEvent":{"action":"show_text","value":[{"text":"Status: Disabled"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/toggle_devmode"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute unless score #dl.dsm dl.tmp matches 1 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[devMode]","color":"#D12D60","hover_event":{"action":"show_text","value":[{"text":"Status: Disabled"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/toggle_devmode"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] scoreboard players reset #dl.dsm dl.tmp diff --git a/data/datalib/function/systems/dev_settings/display/page/version.mcfunction b/data/datalib/function/systems/dev_settings/display/page/version.mcfunction index 5928dc2..1395e96 100644 --- a/data/datalib/function/systems/dev_settings/display/page/version.mcfunction +++ b/data/datalib/function/systems/dev_settings/display/page/version.mcfunction @@ -1,19 +1,18 @@ # datalib:systems/dev_settings/display/page/version -# Version selector page — single page, all components in {"text":"","extra":[...]}. execute store result score #dl.dsv dl.tmp run data get storage datalib:engine dev_settings.version -execute if score #dl.dsv dl.tmp matches 116 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hoverEvent":{"action":"show_text","value":[{"text":"Current: 1.16"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute if score #dl.dsv dl.tmp matches 116 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":[{"text":"Current: 1.16"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] -execute if score #dl.dsv dl.tmp matches 117 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hoverEvent":{"action":"show_text","value":[{"text":"Current: 1.17"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute if score #dl.dsv dl.tmp matches 117 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":[{"text":"Current: 1.17"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] -execute if score #dl.dsv dl.tmp matches 118 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hoverEvent":{"action":"show_text","value":[{"text":"Current: 1.18"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute if score #dl.dsv dl.tmp matches 118 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":[{"text":"Current: 1.18"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] -execute if score #dl.dsv dl.tmp matches 119 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hoverEvent":{"action":"show_text","value":[{"text":"Current: 1.19"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute if score #dl.dsv dl.tmp matches 119 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":[{"text":"Current: 1.19"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] -execute if score #dl.dsv dl.tmp matches 120 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hoverEvent":{"action":"show_text","value":[{"text":"Current: 1.20"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hoverEvent":{"action":"show_text","value":[{"text":" "}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hoverEvent":{"action":"show_text","value":[{"text":"Delete Book"}]},"clickEvent":{"action":"run_command","value":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] +execute if score #dl.dsv dl.tmp matches 120 run item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[{"text":"","extra":[{"text":" -","bold":true},{"text":"Dev Settings","color":"gold","bold":true},{"text":"-","bold":true},{"text":"\n\n\n"},{"text":"Toggle Type:"},{"text":"\n"},{"text":" - "},{"text":"[Misc]","color":"light_purple"},{"text":"\n\n\n\n"},{"text":"Misc Settings:"},{"text":"\n"},{"text":" \u25c4 ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":[{"text":"Current: 1.20"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" \u25ba ","color":"dark_aqua","hover_event":{"action":"show_text","value":[{"text":" "}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/right"}},{"text":"\n\n\n\n"},{"text":" "},{"text":"[Close]","color":"red","hover_event":{"action":"show_text","value":[{"text":"Delete Book"}]},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}]}]},minecraft:custom_data={datalib_dev_settings:1b},minecraft:item_name={"text":"Dev Settings","italic":false,"color":"light_purple"},minecraft:lore=[{"text":"dataLib","italic":false,"color":"#00AAAA"}]] execute unless score #dl.dsv dl.tmp matches 116..120 run data modify storage datalib:engine dev_settings.version set value 120 execute unless score #dl.dsv dl.tmp matches 116..120 run function datalib:systems/dev_settings/display/page/version -scoreboard players reset #dl.dsv dl.tmp +scoreboard players reset #dl.dsv dl.tmp \ No newline at end of file diff --git a/data/dl_load/function/load/internal/cleanup.mcfunction b/data/dl_load/function/load/internal/cleanup.mcfunction index 2c7f715..bdf3bb5 100644 --- a/data/dl_load/function/load/internal/cleanup.mcfunction +++ b/data/dl_load/function/load/internal/cleanup.mcfunction @@ -3,7 +3,7 @@ schedule clear datalib:core/lib/sync_tick forceload remove -30000000 1600 forceload remove 0 0 -scoreboard players reset @a dl_menu +scoreboard players reset @a datalib_menu scoreboard players reset @a dl_run scoreboard players reset $tick dl.tmp @@ -49,7 +49,7 @@ data remove storage datalib:engine rate_limit scoreboard objectives remove dl.tmp scoreboard objectives remove datalib.time -scoreboard objectives remove dl_menu +scoreboard objectives remove datalib_menu scoreboard objectives remove dl_run scoreboard objectives remove dl_action scoreboard objectives remove datalib.tick_guard diff --git a/data/dl_load/function/load/other.mcfunction b/data/dl_load/function/load/other.mcfunction index 429fff5..51f0089 100644 --- a/data/dl_load/function/load/other.mcfunction +++ b/data/dl_load/function/load/other.mcfunction @@ -8,7 +8,7 @@ data remove storage datalib:input func data remove storage datalib:input interval data remove storage datalib:input key -scoreboard players enable @a[tag=datalib.admin] dl_menu +scoreboard players enable @a[tag=datalib.admin] datalib_menu scoreboard players enable @a[tag=datalib.admin] dl_run scoreboard players enable @a[tag=datalib.admin] dl_action diff --git a/data/dl_load/function/load/scoreboards.mcfunction b/data/dl_load/function/load/scoreboards.mcfunction index c2741dd..85363cf 100644 --- a/data/dl_load/function/load/scoreboards.mcfunction +++ b/data/dl_load/function/load/scoreboards.mcfunction @@ -1,6 +1,6 @@ scoreboard objectives add dl.tmp dummy scoreboard objectives add datalib.time dummy -scoreboard objectives add dl_menu trigger +scoreboard objectives add datalib_menu trigger scoreboard objectives add dl_run trigger scoreboard objectives add dl_action trigger scoreboard objectives add datalib.dialog_load dummy @@ -9,6 +9,7 @@ scoreboard objectives add health health {"text":"❤","color":"red"} scoreboard objectives add dl.pre_version dummy scoreboard objectives add datalib.pid dummy scoreboard objectives add dl.freeze_id dummy +scoreboard objectives add datalib.onlinePlayers dummy # Lantern Load integration — pack version tracking scoreboard objectives add load.status dummy