这些补丁来自 DatapackSandbox,基线提交为 cc9ae9634813b0087be0d9d41384f679ec240ca5。上游许可证见 LICENSE。仓库保存源码补丁,不分发工具 JAR。
按以下顺序应用:live-debug → render-nbt → render-ui → render-performance → quoted-nbt → examples-runtime。前五个补丁恢复插件使用的 26.3、JSONL 调试和渲染能力;最后一个补丁是运行这些例子时修复的差异:
execute summon使用新实体作为执行者,并保持原执行位置和维度。- 末尾的
execute if/unless返回结果,支持float_value_check和实体计数;连续的store写入同一次执行结果。 - 实体 NBT 的
UUID返回四个有符号整数,支持编译器读取并转换为类型化实体引用。 - 命令追踪的差异和输出只保存本命令新增内容,避免复制历史及子函数输出。
- CLI
check默认关闭命令追踪;显式追踪参数、清单 trace 断言和 trace 导出步骤启用完整追踪。普通截图也按需关闭追踪;世界状态、输出与覆盖统计继续记录。
需要 Git、JDK 25;首次构建需要联网获取 Gradle 和依赖。在示例仓库根目录执行:
git clone -c core.autocrlf=false https://github.com/Alumopper/DatapackSandbox.git build/DatapackSandbox
cd build/DatapackSandbox
git checkout cc9ae9634813b0087be0d9d41384f679ec240ca5
git apply ../../tools/runtime/mcfpp-live-debug.patch
git apply ../../tools/runtime/mcfpp-render-nbt.patch
git apply ../../tools/runtime/mcfpp-render-ui.patch
git apply ../../tools/runtime/mcfpp-render-performance.patch
git apply ../../tools/runtime/mcfpp-quoted-nbt.patch
git apply ../../tools/runtime/mcfpp-examples-runtime.patch
./gradlew :cli:fatJarWindows PowerShell 使用 .\gradlew.bat :cli:fatJar。输出为 cli/build/libs/datapack-sandbox-cli.jar,在示例验证命令中通过 --dsb 指定,也可通过插件的 DSB 运行时配置使用。
针对修复的检查:
./gradlew :core:test --tests moe.afox.dpsandbox.core.ExecuteCompositionTest --tests moe.afox.dpsandbox.core.CommandTraceOutputTest --tests moe.afox.dpsandbox.core.CommandExecuteAndSelectorTest --tests moe.afox.dpsandbox.core.NbtSchemaTest
./gradlew :cli:test --tests moe.afox.dpsandbox.cli.CheckCommandTest --tests moe.afox.dpsandbox.cli.RenderCommandTest已核对六个补丁依次应用成功,最后一个补丁涉及的 13 个文件与实际测试使用的源码一致。验证二进制 SHA-256:
6041464481ca6017316e4d08c65a08cb2fc304aa8c5585a7a37ffc64b2352d44。JDK 发行版和构建依赖会影响重新构建的二进制字节。