feat(debug): 支持网易 Minecraft 调试启动

新增 debug 子命令,自动准备开发世界、注册内置调试 MOD,并将项目行为包和资源包链接到网易运行目录,方便启动游戏后直接进入调试世界。

调试 MOD 资源随仓库一起嵌入,避免依赖本机绝对路径;Windows junction 写入剥离 verbatim 前缀后的 DOS 路径,保证 Minecraft 能正确读取链接包。
This commit is contained in:
2026-05-16 00:59:51 +08:00
parent de2b804aad
commit 011b59c948
36 changed files with 4138 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ use clap::{Args, Parser, Subcommand, arg};
pub mod components;
pub mod create;
pub mod debug;
pub mod init;
pub mod release;
@@ -29,6 +30,8 @@ pub enum Commands {
Init(InitArgs),
/// Create a new component
Components(ComponentsArgs),
/// Launch NetEase Minecraft with debug MOD, IPC logging, and hot reload
Debug(DebugArgs),
}
#[derive(Args)]
@@ -83,3 +86,10 @@ pub struct ComponentsArgs {
#[arg(short, long)]
pub identifier: Option<String>,
}
#[derive(Args)]
pub struct DebugArgs {
/// The path of the project (default: current directory)
#[arg(short, long)]
pub path: Option<String>,
}