diff --git a/data/datalib/function/systems/dev_settings/display/internal/give_book.mcfunction b/data/datalib/function/systems/dev_settings/display/internal/give_book.mcfunction deleted file mode 100644 index 75968af..0000000 --- a/data/datalib/function/systems/dev_settings/display/internal/give_book.mcfunction +++ /dev/null @@ -1,6 +0,0 @@ -# datalib:systems/dev_settings/display/internal/give_book -# Injects the pre-built page SNBT from storage into a written_book -# and places it directly in the player's mainhand via item replace. -# Expects: datalib:temp dev_settings_pages (string — serialized JSON array) - -function datalib:systems/dev_settings/display/internal/give_book_macro with storage datalib:temp {} diff --git a/data/datalib/function/systems/dev_settings/display/internal/give_book_macro.mcfunction b/data/datalib/function/systems/dev_settings/display/internal/give_book_macro.mcfunction deleted file mode 100644 index ce3c59d..0000000 --- a/data/datalib/function/systems/dev_settings/display/internal/give_book_macro.mcfunction +++ /dev/null @@ -1,5 +0,0 @@ -# datalib:systems/dev_settings/display/internal/give_book_macro -# Macro function — injects dev_settings_pages into the written book component. -# Arg: dev_settings_pages (string — serialized written_book_content pages SNBT) - -$item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:[$(dev_settings_pages)]},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"}']] diff --git a/data/datalib/function/systems/dev_settings/display/open.mcfunction b/data/datalib/function/systems/dev_settings/display/open.mcfunction index a9a5d11..7e0301c 100644 --- a/data/datalib/function/systems/dev_settings/display/open.mcfunction +++ b/data/datalib/function/systems/dev_settings/display/open.mcfunction @@ -1,23 +1,15 @@ # datalib:systems/dev_settings/display/open -# Builds the Dev Settings written book in datalib:temp and gives it to @s. -# Called by the chat link in datalib:systems/dev_settings/menu. -# Page routing is driven by the player's dl.dev_pg2 score. +# Clears any existing settings book then dispatches to the correct page function. +# Page functions give the book directly via item replace — no storage intermediate. execute unless function datalib:debug/tools/utils/perm_check run return 0 -# Reset page-2 cursor to slot 1 (version) if not already set +# Reset cursor if out of range execute unless score @s dl.dev_pg2 matches 1..2 run scoreboard players set @s dl.dev_pg2 1 -# Clear any existing settings book from the player +# Clear existing book clear @s minecraft:written_book[custom_data={datalib_dev_settings:1b}] -# Dispatch page render — writes the page JSON into datalib:temp dev_settings_pages +# Dispatch — each page function does its own item replace execute as @s[scores={dl.dev_pg2=1}] run function datalib:systems/dev_settings/display/page/version execute as @s[scores={dl.dev_pg2=2}] run function datalib:systems/dev_settings/display/page/devmode - -# Give the book using the standard give command with component syntax -# Pages are written by page/* functions into datalib:temp dev_settings_pages -function datalib:systems/dev_settings/display/internal/give_book - -# Cleanup -data remove storage datalib:temp dev_settings_pages 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 8e8cd97..97e6211 100644 --- a/data/datalib/function/systems/dev_settings/display/page/devmode.mcfunction +++ b/data/datalib/function/systems/dev_settings/display/page/devmode.mcfunction @@ -1,13 +1,10 @@ # datalib:systems/dev_settings/display/page/devmode -# Builds the devMode toggle page SNBT into datalib:temp dev_settings_pages. -# Reads datalib:engine dev_settings.devMode (0b = disabled, 1b = enabled). +# devMode toggle page — single page, all components in {"text":"","extra":[...]}. execute store result score #dl.dsm dl.tmp run data get storage datalib:engine dev_settings.devMode -# devMode ENABLED (score == 1) -execute if score #dl.dsm dl.tmp matches 1 run data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[devMode]","color":"#2DD158","hover_event":{"action":"show_text","value":"Status: Enabled"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/toggle_devmode"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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"}]] -# devMode DISABLED (score == 0 or unset) -execute unless score #dl.dsm dl.tmp matches 1 run data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[devMode]","color":"#D12D60","hover_event":{"action":"show_text","value":"Status: Disabled"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/toggle_devmode"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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"}]] 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 a7c9a35..3135e73 100644 --- a/data/datalib/function/systems/dev_settings/display/page/version.mcfunction +++ b/data/datalib/function/systems/dev_settings/display/page/version.mcfunction @@ -1,20 +1,18 @@ # datalib:systems/dev_settings/display/page/version -# Builds the Version selector page SNBT into datalib:temp dev_settings_pages. -# Reads datalib:engine dev_settings.version (int: 116-120). +# 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 data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":"Current Ver: 1.16"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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 117 run data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":"Current Ver: 1.17"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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 118 run data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":"Current Ver: 1.18"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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 119 run data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":"Current Ver: 1.19"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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 120 run data modify storage datalib:temp dev_settings_pages set value '{"text":""},{"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":" ◄ ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/nav/left"}},{"text":"[Version]","color":"#1d1dc4","hover_event":{"action":"show_text","value":"Current Ver: 1.20"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/actions/cycle_version"}},{"text":" ► ","color":"dark_aqua","hover_event":{"action":"show_text","value":" "},"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":"Delete Book"},"click_event":{"action":"run_command","command":"/function datalib:systems/dev_settings/display/close"}}' +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"}]] -# Fallback: reset to 120 then retry 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