DecompilerMC 项目使用教程

DecompilerMC 项目使用教程

DecompilerMC This repository allows you to decompile any minecraft version that was published after 19w36a without any 3rd party mappings, you just need to execute the script or the executable (see releases)! Thanks mojang to have published proguard mappings DecompilerMC 项目地址: https://gitcode.com/gh_mirrors/de/DecompilerMC

1. 项目的目录结构及介绍

DecompilerMC 项目的目录结构如下:

DecompilerMC/
├── github/
│   └── workflows/
├── lib/
├── versions/
├── tmp/
├── src/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── main.py
└── ...

目录结构介绍:

  • github/workflows/: 包含 GitHub Actions 的工作流配置文件。
  • lib/: 存放项目依赖的库文件。
  • versions/: 存放 Minecraft 版本的元数据和 JAR 文件。
  • tmp/: 临时文件夹,用于存放中间生成的文件。
  • src/: 存放最终生成的源代码文件。
  • .editorconfig: 编辑器配置文件,用于统一代码风格。
  • .gitattributes: Git 属性配置文件,用于指定文件的属性。
  • .gitignore: Git 忽略文件配置,指定哪些文件不需要被 Git 跟踪。
  • LICENSE: 项目的开源许可证文件。
  • README.md: 项目的说明文档。
  • main.py: 项目的启动文件。

2. 项目的启动文件介绍

项目的启动文件是 main.py。该文件是 DecompilerMC 的核心脚本,负责执行 Minecraft 版本的反编译任务。

主要功能:

  • 版本选择: 允许用户选择要反编译的 Minecraft 版本。
  • 反编译器选择: 支持使用 CFR 或 Fernflower 进行反编译。
  • 自动/手动模式: 可以选择自动模式或手动模式进行反编译。
  • 清理旧运行: 支持清理旧的反编译结果。
  • 强制覆盖: 支持强制覆盖旧文件或创建新目录。

使用示例:

python3 main.py --mcversion latest -q

该命令将自动选择最新的 Minecraft 版本进行反编译,并使用安静模式(不显示详细信息)。

3. 项目的配置文件介绍

DecompilerMC 项目没有明确的配置文件,但可以通过命令行参数进行配置。以下是一些常用的命令行参数:

常用参数:

  • --mcversion: 指定要反编译的 Minecraft 版本。例如 --mcversion latest 表示反编译最新的版本。
  • --side: 指定要反编译的客户端或服务器端。例如 --side client 表示反编译客户端。
  • --clean: 清理旧的反编译结果。
  • --force: 强制覆盖旧文件。
  • --decompiler: 选择反编译器,例如 --decompiler cfr 表示使用 CFR 进行反编译。
  • --quiet: 安静模式,不显示详细信息。

完整参数列表:

usage: main.py [-h] [--mcversion MCVERSION] [--side SIDE] [--clean] [--force] [--forceno] [--decompiler DECOMPILER] [--nauto] [--download_mapping DOWNLOAD_MAPPING] [--remap_mapping [REMAP_MAPPING]] [--download_jar [DOWNLOAD_JAR]] [--remap_jar [REMAP_JAR]] [--delete_dep [DELETE_DEP]] [--decompile [DECOMPILE]] [--quiet]

通过这些参数,用户可以灵活地配置反编译任务的各个方面。

DecompilerMC This repository allows you to decompile any minecraft version that was published after 19w36a without any 3rd party mappings, you just need to execute the script or the executable (see releases)! Thanks mojang to have published proguard mappings DecompilerMC 项目地址: https://gitcode.com/gh_mirrors/de/DecompilerMC

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

江奎钰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值