diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd52273..3be1135 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: # 📂 Copy base layer (excluding overlay directories) - name: Copy base layer run: | - OVERLAY_DIRS="1_20_3 1_20_5 _pre_1_21_4 compat_1_21_4 1_21_5 1_21_6 26_1" + OVERLAY_DIRS="1_20_3 1_20_5 _pre_1_21_4 compat_1_21_4 1_21_5 1_21_6 26_1 26_2" EXCLUDES="" for d in $OVERLAY_DIRS; do EXCLUDES="$EXCLUDES --exclude=$d" @@ -68,7 +68,7 @@ jobs: # 📂 Copy overlays - name: Copy target overlays run: | - ALL_OVERLAYS="1_20_3 1_20_5 _pre_1_21_4 compat_1_21_4 1_21_5 1_21_6 26_1" + ALL_OVERLAYS="1_20_3 1_20_5 _pre_1_21_4 compat_1_21_4 1_21_5 1_21_6 26_1 26_2" TARGET="${{ matrix.overlays }}" if [ -z "$TARGET" ]; then diff --git a/1_20_3/data/dl_load/functions/load/internal/validate.mcfunction b/1_20_3/data/dl_load/functions/load/internal/validate.mcfunction index fadd901..3d2800e 100644 --- a/1_20_3/data/dl_load/functions/load/internal/validate.mcfunction +++ b/1_20_3/data/dl_load/functions/load/internal/validate.mcfunction @@ -12,7 +12,7 @@ scoreboard objectives add dl.pre_version dummy scoreboard players set #dl.mismatch dl.pre_version 0 execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.major dl.pre_version matches 5 run scoreboard players set #dl.mismatch dl.pre_version 1 execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.minor dl.pre_version matches 1 run scoreboard players set #dl.mismatch dl.pre_version 1 -execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.patch dl.pre_version matches 1 run scoreboard players set #dl.mismatch dl.pre_version 1 +execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.patch dl.pre_version matches 2 run scoreboard players set #dl.mismatch dl.pre_version 1 execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.pre dl.pre_version matches 0 run scoreboard players set #dl.mismatch dl.pre_version 1 execute if score #dl.mismatch dl.pre_version matches 1 run function dl_load:load/internal/version_warn execute if score #dl.mismatch dl.pre_version matches 1 run return 0 diff --git a/1_20_3/data/dl_load/functions/load/internal/version_warn.mcfunction b/1_20_3/data/dl_load/functions/load/internal/version_warn.mcfunction index 2bac0e5..3d19012 100644 --- a/1_20_3/data/dl_load/functions/load/internal/version_warn.mcfunction +++ b/1_20_3/data/dl_load/functions/load/internal/version_warn.mcfunction @@ -1,7 +1,7 @@ tellraw @a ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"✘ ","color":"red"},{"text":"Version conflict! ","color":"red","bold":true},{"text":"Expected ","color":"#555555"},{"text":"v5.1.2","color":"aqua","bold":true},{"text":" — stored scores do not match.","color":"#555555"}] -tellraw @a ["",{"text":" ","color":"#555555"},{"text":"→ Run ","color":"gray"},{"text":"/reload","color":"aqua","underlined":true,"hoverEvent":{"action":"show_text","value":"Reload Dat"}},{"text":" to reinitialize dataLib.","color":"gray"}] +tellraw @a ["",{"text":" ","color":"#555555"},{"text":"→ Run ","color":"gray"},{"text":"/reload","color":"aqua","underlined":true,"hoverEvent":{"action":"show_text","value":"Reload DataLib"}},{"text":" to reinitialize dataLib.","color":"gray"}] -tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"DEBUG ","color":"aqua"},{"text":"dl.pre_version scores → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 4 0 4 pre=0)","color":"red"}] +tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"DEBUG ","color":"aqua"},{"text":"dl.pre_version scores → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 5 1 2 pre=0)","color":"red"}] data modify storage datalib:input message set value "✘ Version mismatch — expected v5.1.2. Load aborted." function datalib:systems/log/warn with storage datalib:input {} diff --git a/1_20_5/data/dl_load/functions/core/internal/load/validate.mcfunction b/1_20_5/data/dl_load/functions/core/internal/load/validate.mcfunction index 7b124e6..ab8d3d3 100644 --- a/1_20_5/data/dl_load/functions/core/internal/load/validate.mcfunction +++ b/1_20_5/data/dl_load/functions/core/internal/load/validate.mcfunction @@ -12,7 +12,7 @@ scoreboard objectives add dl.pre_version dummy scoreboard players set #dl.mismatch dl.pre_version 0 execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.major dl.pre_version matches 5 run scoreboard players set #dl.mismatch dl.pre_version 1 execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.minor dl.pre_version matches 1 run scoreboard players set #dl.mismatch dl.pre_version 1 -execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.patch dl.pre_version matches 1 run scoreboard players set #dl.mismatch dl.pre_version 1 +execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.patch dl.pre_version matches 2 run scoreboard players set #dl.mismatch dl.pre_version 1 execute if score #dl.ver_set dl.pre_version matches 1 run execute unless score #dl.pre dl.pre_version matches 0 run scoreboard players set #dl.mismatch dl.pre_version 1 execute if score #dl.mismatch dl.pre_version matches 1 run function dl_load:core/internal/load/version_warn execute if score #dl.mismatch dl.pre_version matches 1 run return 0 diff --git a/1_20_5/data/dl_load/functions/core/internal/load/version_warn.mcfunction b/1_20_5/data/dl_load/functions/core/internal/load/version_warn.mcfunction index 62803bf..8c50036 100644 --- a/1_20_5/data/dl_load/functions/core/internal/load/version_warn.mcfunction +++ b/1_20_5/data/dl_load/functions/core/internal/load/version_warn.mcfunction @@ -1,7 +1,7 @@ tellraw @a ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"✘ ","color":"red"},{"text":"Version conflict! ","color":"red","bold":true},{"text":"Expected ","color":"#555555"},{"text":"v5.1.2","color":"aqua","bold":true},{"text":" — stored scores do not match.","color":"#555555"}] -tellraw @a ["",{"text":" ","color":"#555555"},{"text":"→ Run ","color":"gray"},{"text":"/reload","color":"aqua","underlined":true,"hoverEvent":{"action":"show_text","value":"Reload Dat"}},{"text":" to reinitialize AME.","color":"gray"}] +tellraw @a ["",{"text":" ","color":"#555555"},{"text":"→ Run ","color":"gray"},{"text":"/reload","color":"aqua","underlined":true,"hoverEvent":{"action":"show_text","value":"Reload DataLib"}},{"text":" to reinitialize dataLib.","color":"gray"}] -tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"DEBUG ","color":"aqua"},{"text":"dl.pre_version scores → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 4 0 4 pre=0)","color":"red"}] +tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"DEBUG ","color":"aqua"},{"text":"dl.pre_version scores → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 5 1 2 pre=0)","color":"red"}] data modify storage datalib:engine _log_add_tmp.message set value "✘ Version mismatch — expected v5.1.2. Load aborted." function datalib:systems/log/warn with storage datalib:engine _log_add_tmp diff --git a/1_21_5/data/dl_load/function/load/version_warn.mcfunction b/1_21_5/data/dl_load/function/load/version_warn.mcfunction index 6eb64f3..d14b33c 100644 --- a/1_21_5/data/dl_load/function/load/version_warn.mcfunction +++ b/1_21_5/data/dl_load/function/load/version_warn.mcfunction @@ -1,7 +1,7 @@ tellraw @a ["",{"text":"❌ ","color":"red"},{"text":"[DL] ","color":"aqua","bold":true},{"text":"Version conflict! ","color":"red","bold":true},{"text":"Expected ","color":"gray"},{"text":"v5.1.2","color":"yellow","bold":true},{"text":" — stored scores do not match.","color":"gray"}] tellraw @a ["",{"text":" ↳ ","color":"#555555"},{"text":"Run ","color":"gray"},{"text":"/reload","color":"white","underlined":true},{"text":" to reinitialize dataLib.","color":"gray"}] -tellraw @a[tag=datalib.debug] ["",{"text":"[DL/DEBUG] ","color":"aqua"},{"text":"dl.pre_version → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 4 0 2 pre=0)","color":"red"}] +tellraw @a[tag=datalib.debug] ["",{"text":"[DL/DEBUG] ","color":"aqua"},{"text":"dl.pre_version → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 5 1 2 pre=0)","color":"red"}] data modify storage datalib:engine _log_add_tmp.message set value "❌ Version mismatch — expected v5.1.2. Load aborted." function datalib:systems/log/warn with storage datalib:engine _log_add_tmp diff --git a/26_2/data/dl_load/function/load/version_warn.mcfunction b/26_2/data/dl_load/function/load/version_warn.mcfunction index 6eb64f3..d14b33c 100644 --- a/26_2/data/dl_load/function/load/version_warn.mcfunction +++ b/26_2/data/dl_load/function/load/version_warn.mcfunction @@ -1,7 +1,7 @@ tellraw @a ["",{"text":"❌ ","color":"red"},{"text":"[DL] ","color":"aqua","bold":true},{"text":"Version conflict! ","color":"red","bold":true},{"text":"Expected ","color":"gray"},{"text":"v5.1.2","color":"yellow","bold":true},{"text":" — stored scores do not match.","color":"gray"}] tellraw @a ["",{"text":" ↳ ","color":"#555555"},{"text":"Run ","color":"gray"},{"text":"/reload","color":"white","underlined":true},{"text":" to reinitialize dataLib.","color":"gray"}] -tellraw @a[tag=datalib.debug] ["",{"text":"[DL/DEBUG] ","color":"aqua"},{"text":"dl.pre_version → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 4 0 2 pre=0)","color":"red"}] +tellraw @a[tag=datalib.debug] ["",{"text":"[DL/DEBUG] ","color":"aqua"},{"text":"dl.pre_version → ","color":"#555555"},{"text":"major=","color":"gray"},{"score":{"name":"#dl.major","objective":"dl.pre_version"},"color":"yellow"},{"text":" minor=","color":"gray"},{"score":{"name":"#dl.minor","objective":"dl.pre_version"},"color":"yellow"},{"text":" patch=","color":"gray"},{"score":{"name":"#dl.patch","objective":"dl.pre_version"},"color":"yellow"},{"text":" pre=","color":"gray"},{"score":{"name":"#dl.pre","objective":"dl.pre_version"},"color":"yellow"},{"text":" (expected: 5 1 2 pre=0)","color":"red"}] data modify storage datalib:engine _log_add_tmp.message set value "❌ Version mismatch — expected v5.1.2. Load aborted." function datalib:systems/log/warn with storage datalib:engine _log_add_tmp diff --git a/data/datalib/function/api/color/from_score.mcfunction b/data/datalib/function/api/color/from_score.mcfunction index 9fe85fb..19e75ca 100644 --- a/data/datalib/function/api/color/from_score.mcfunction +++ b/data/datalib/function/api/color/from_score.mcfunction @@ -9,7 +9,7 @@ # # Input (macro args): # objective — scoreboard objective name -# player — fake player or selector name (@s not supported; use real name) +# player — player name, fake player name (include # prefix), or selector string # low_threshold — score below this → low_color # mid_threshold — score below this → mid_color (if >= low_threshold) # low_color — color for low range (e.g. "red") @@ -29,7 +29,7 @@ $data modify storage datalib:output result set value "$(high_color)" # Override with low or mid if score is below threshold -$execute if score #$(player) $(objective) matches ..$(low_threshold) run data modify storage datalib:output result set value "$(low_color)" -$execute if score #$(player) $(objective) matches $(low_threshold)..$(mid_threshold) run data modify storage datalib:output result set value "$(mid_color)" +$execute if score $(player) $(objective) matches ..$(low_threshold) run data modify storage datalib:output result set value "$(low_color)" +$execute if score $(player) $(objective) matches $(low_threshold)..$(mid_threshold) run data modify storage datalib:output result set value "$(mid_color)" $tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"color/from_score ","color":"aqua"},{"text":"$(player) ","color":"white"},{"text":"→ ","color":"#555555"},{"storage":"datalib:output","nbt":"result","color":"green"}] diff --git a/data/datalib/function/api/color/resolve.mcfunction b/data/datalib/function/api/color/resolve.mcfunction index 36ec221..b3260db 100644 --- a/data/datalib/function/api/color/resolve.mcfunction +++ b/data/datalib/function/api/color/resolve.mcfunction @@ -22,7 +22,9 @@ # Default: return input value $data modify storage datalib:output result set value "$(color)" -# Override if palette has this key -execute if data storage datalib:engine color.palette run function datalib:core/internal/systems/color/resolve_exec with storage datalib:engine color +# Override if palette has this key — write color key into temp so resolve_exec can access it +$data modify storage datalib:engine _color_resolve_tmp set value {color:"$(color)"} +execute if data storage datalib:engine color.palette run function datalib:core/internal/systems/color/resolve_exec with storage datalib:engine _color_resolve_tmp +data remove storage datalib:engine _color_resolve_tmp $tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"color/resolve ","color":"aqua"},{"text":"$(color)","color":"white"},{"text":" → ","color":"#555555"},{"storage":"datalib:output","nbt":"result","color":"green"}] diff --git a/data/datalib/function/api/gamerule/get.mcfunction b/data/datalib/function/api/gamerule/get.mcfunction index 394125e..c0a4d66 100644 --- a/data/datalib/function/api/gamerule/get.mcfunction +++ b/data/datalib/function/api/gamerule/get.mcfunction @@ -12,7 +12,7 @@ # function datalib:api/gamerule/get with storage datalib:input {} # # read: data get storage datalib:output gamerule -execute unless function datalib:debug/tools/utils/check_all run return 0 +execute unless function datalib:core/security/cmd_gate run return 0 # Normalize key (spaces → underscores, lowercase) data modify storage stringlib:input replace.String set from storage datalib:input rule diff --git a/data/datalib/function/api/gamerule/reset.mcfunction b/data/datalib/function/api/gamerule/reset.mcfunction index 9706513..8a97811 100644 --- a/data/datalib/function/api/gamerule/reset.mcfunction +++ b/data/datalib/function/api/gamerule/reset.mcfunction @@ -9,7 +9,7 @@ # data modify storage datalib:input rule set value "pvp_enabled" # function datalib:api/gamerule/reset with storage datalib:input {} -execute unless function datalib:debug/tools/utils/check_all run return 0 +execute unless function datalib:core/security/cmd_gate run return 0 # Normalize data modify storage stringlib:input replace.String set from storage datalib:input rule diff --git a/data/datalib/function/api/gamerule/set.mcfunction b/data/datalib/function/api/gamerule/set.mcfunction index 75a7d2e..e86a74f 100644 --- a/data/datalib/function/api/gamerule/set.mcfunction +++ b/data/datalib/function/api/gamerule/set.mcfunction @@ -21,7 +21,7 @@ # # RETURN: 1 on success, 0 on guard failure. -execute unless function datalib:debug/tools/utils/check_all run return 0 +execute unless function datalib:core/security/cmd_gate run return 0 # ── Normalize rule name: spaces → underscores via StringLib ────────────────── data modify storage stringlib:input replace.String set from storage datalib:input rule diff --git a/data/datalib/function/core/internal/systems/color/validate_exec.mcfunction b/data/datalib/function/core/internal/systems/color/validate_exec.mcfunction index 65ff5d1..59cafa9 100644 --- a/data/datalib/function/core/internal/systems/color/validate_exec.mcfunction +++ b/data/datalib/function/core/internal/systems/color/validate_exec.mcfunction @@ -2,4 +2,4 @@ # Internal — called by api/color/validate. # Sets datalib:output result to 1b if $(color) is a known named color, # or if it begins with "#" (hex shorthand detection). -$execute if data storage datalib:engine color._names{$(color):1b} run data modify storage datalib:output result set value 1b +$execute if data storage datalib:engine color._names.$(color) run data modify storage datalib:output result set value 1b diff --git a/data/datalib/function/systems/string/progress_bar_self.mcfunction b/data/datalib/function/systems/string/progress_bar_self.mcfunction index 4dc120b..e111324 100644 --- a/data/datalib/function/systems/string/progress_bar_self.mcfunction +++ b/data/datalib/function/systems/string/progress_bar_self.mcfunction @@ -21,4 +21,3 @@ $execute if score $pbs_seg dl.tmp matches 7 run title @s actionbar {"text":"$(pb $execute if score $pbs_seg dl.tmp matches 8 run title @s actionbar {"text":"$(pb_label) ████████░░"} $execute if score $pbs_seg dl.tmp matches 9 run title @s actionbar {"text":"$(pb_label) █████████░"} $execute if score $pbs_seg dl.tmp matches 10 run title @s actionbar {"text":"$(pb_label) ██████████"} -tellraw @a[tag=datalib.debug] ["",{"text":"[DL] ","color":"#00AAAA","bold":true},{"text":"string/progress_bar_self ","color":"aqua"}]