From 24b8e0c812e689f69b705c7f16e208b045a1d4e8 Mon Sep 17 00:00:00 2001 From: Legends11 Date: Tue, 12 May 2026 05:57:07 +0000 Subject: [PATCH 1/2] fix: replace storage+macro book give with inline item replace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.21.5 parses written_book pages with single-quote delimiters as plain text instead of JSON. Removed the storage-intermediate approach entirely — page functions now call item replace directly with the full component SNBT inline. - display/page/version.mcfunction: inline item replace per version score - display/page/devmode.mcfunction: inline item replace per devMode value - display/open.mcfunction: simplified — no storage writes, no macro call - display/internal/give_book{,_macro}.mcfunction: deleted (unused) clickEvent/hoverEvent keys kept (not click_event/hover_event) for compatibility with the book renderer across all supported pack formats. --- .../display/internal/give_book.mcfunction | 6 ------ .../internal/give_book_macro.mcfunction | 5 ----- .../dev_settings/display/open.mcfunction | 18 +++++------------- .../display/page/devmode.mcfunction | 13 +++++++------ .../display/page/version.mcfunction | 13 +++++++------ 5 files changed, 19 insertions(+), 36 deletions(-) delete mode 100644 data/datalib/function/systems/dev_settings/display/internal/give_book.mcfunction delete mode 100644 data/datalib/function/systems/dev_settings/display/internal/give_book_macro.mcfunction 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..76ef42e 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,14 @@ # 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). +# Builds devMode toggle page and gives the book directly via item replace. +# Uses inline JSON for pages — avoids single-quote SNBT parse bug in 1.21.5. +# Reads datalib:engine dev_settings.devMode (0b=disabled, 1b=enabled). 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"}}' +# devMode ENABLED +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":""},{"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"}}' +# devMode DISABLED +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":""},{"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..2467586 100644 --- a/data/datalib/function/systems/dev_settings/display/page/version.mcfunction +++ b/data/datalib/function/systems/dev_settings/display/page/version.mcfunction @@ -1,18 +1,19 @@ # datalib:systems/dev_settings/display/page/version -# Builds the Version selector page SNBT into datalib:temp dev_settings_pages. +# Builds Version selector page and gives the book directly via item replace. +# Uses inline JSON for pages — avoids single-quote SNBT parse bug in 1.21.5. # Reads datalib:engine dev_settings.version (int: 116-120). 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":""},{"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 Ver: 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":""},{"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 Ver: 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":""},{"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 Ver: 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":""},{"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 Ver: 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":""},{"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 Ver: 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 From 6b27b74c490740cd4f76a8e3bb7d7523f69252fb Mon Sep 17 00:00:00 2001 From: Legends11 Date: Tue, 12 May 2026 06:07:07 +0000 Subject: [PATCH 2/2] fix: wrap book page components in {"text":"","extra":[...]} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Multiple top-level component objects in a pages entry were being parsed as separate pages. All components now wrapped in a single root object with extra array — renders as one page. --- .../dev_settings/display/page/devmode.mcfunction | 10 +++------- .../dev_settings/display/page/version.mcfunction | 15 ++++++--------- 2 files changed, 9 insertions(+), 16 deletions(-) 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 76ef42e..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,14 +1,10 @@ # datalib:systems/dev_settings/display/page/devmode -# Builds devMode toggle page and gives the book directly via item replace. -# Uses inline JSON for pages — avoids single-quote SNBT parse bug in 1.21.5. -# 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 -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":""},{"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","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 -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":""},{"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","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 2467586..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,21 +1,18 @@ # datalib:systems/dev_settings/display/page/version -# Builds Version selector page and gives the book directly via item replace. -# Uses inline JSON for pages — avoids single-quote SNBT parse bug in 1.21.5. -# 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 item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:['[{"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":" \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 Ver: 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","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 item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:['[{"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":" \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 Ver: 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","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 item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:['[{"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":" \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 Ver: 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","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 item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:['[{"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":" \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 Ver: 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","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 item replace entity @s weapon.mainhand with minecraft:written_book[minecraft:written_book_content={author:"",title:"",pages:['[{"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":" \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 Ver: 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","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