RetroConvert
将你的 Babric 模组放入 Ornithe 实例中,RetroConvert 会在启动时自动转换它们。
Babric 和 Ornithe 都基于 Minecraft Beta 1.7.3 运行 Fabric Loader,但它们使用不同的中间映射表(intermediary mappings),因此两者的模组并不兼容。RetroConvert 解决了这个问题:在启动时,它会就地重写 Babric 模组的字节码,以词元对词元的方式转换为 Ornithe 的 Calamus gen2 映射表,无需重新编译、无需源码,也不需要联网。
功能
- 完全自动 只需将 Babric
.jar 文件放入 mods 文件夹,与 RetroConvert 放在一起并启动即可。转换后的模组显示为 <name>-ornithe.jar;原始文件安全地归档在 config/retroconvert/originals/ 中。
- 深度转换 重写类字节码、mixin 注解(包括无 refmap 的字符串目标)、refmap JSON、访问宽化器(access wideners)、
fabric.mod.json、用于反射的字符串常量,以及嵌套 jar-in-jar 模组,递归处理。
- 无可见重启 转换完成后,Fabric Loader 会在同一个 JVM 内针对转换后的模组文件夹重新启动。游戏直接启动,无明显中断。
- 智能检测 已经移植到 Ornithe 的模组会被保留原样不动,带有嵌套 jar 的大型模组(如 StationAPI)会按每个 jar 单独处理。
- 官方构建替换 少数模组(StationAPI、GlassConfigAPI)改动过大,无法通过字节码重写完成适配;对于这些模组,会下载其官方 Ornithe 版本,而字节码转换仅作为离线回退方案。
- 缓存机制 jar 文件以 SHA-256 哈希值作为键,因此在后续启动时只会扫描新文件。
使用方法
- 将 RetroConvert 安装到 Ornithe b1.7.3 实例的
mods 文件夹中。
- 将你的 Babric 模组添加到同一文件夹。
- 启动游戏。就这样。
可选:Java Agent 模式(零重启,即使是首次启动)
将此添加到你的 JVM 参数中(Prism Launcher:实例 → 设置 → Java → JVM 参数):
-javaagent:mods/retroconvert-1.0.1+mcb1.7.3.jar
这会在 Fabric Loader 扫描文件夹之前转换模组,完全不需要重启逻辑。同样的命令行适用于 Prism、MultiMC 和原版启动器上的所有实例。
无头模式(Headless usage)
在不启动游戏的情况下转换任意模组文件夹:
./gradlew runConverter --args="/path/to/.minecraft/mods"
限制
- 仅支持 b1.7.3,这是由设计决定的,因为 Babric 仅针对 b1.7.3。
- 如果某个 Babric 模组在依赖解析阶段失败,会在 RetroConvert 运行前崩溃;请手动移除该 jar 文件。
- 不要将已归档的原始文件与其转换输出放在同一目录下,否则加载器会检测到两个具有相同 ID 的模组。
许可证与源代码
源代码、问题追踪器以及完整的技术细节可在 GitHub 上获取。
RetroConvert
Drop your Babric mods into an Ornithe instance RetroConvert converts them automatically at launch.
Babric and Ornithe both run Fabric Loader on Minecraft Beta 1.7.3, but they use different intermediary mappings, so their mods aren't compatible with each other. RetroConvert fixes that: at launch it rewrites Babric mods' bytecode in place to Ornithe's Calamus gen2 mappings token for token, with no recompilation, no sources, and no internet required.
Features
- Fully automatic just put Babric
.jar files in your mods folder alongside RetroConvert and launch. Converted mods appear as <name>-ornithe.jar; originals are safely archived in config/retroconvert/originals/.
- Deep conversion rewrites class bytecode, mixin annotations (including refmap-less string targets), refmap JSONs, access wideners,
fabric.mod.json, string constants used for reflection, and nested jar-in-jar mods, recursively.
- No visible restart after converting, Fabric Loader is relaunched inside the same JVM over the converted mods folder. The game just starts.
- Smart detection already-ported Ornithe mods are left untouched, and umbrella mods with nested jars (like StationAPI) are handled per-jar.
- Official-build replacements a few mods (StationAPI, GlassConfigAPI) changed too much for a bytecode rewrite; for those, the official Ornithe build is downloaded instead, with bytecode conversion as the offline fallback.
- Cached jars are keyed by SHA-256, so only new files are scanned on later launches.
Usage
- Install RetroConvert into an Ornithe b1.7.3 instance's
mods folder.
- Add your Babric mods to the same folder.
- Launch. That's it.
Optional: Java agent mode (zero-restart, even on first launch)
Add this to your JVM arguments (Prism Launcher: instance → Settings → Java → JVM arguments):
-javaagent:mods/retroconvert-1.0.1+mcb1.7.3.jar
This converts mods before Fabric Loader scans the folder no relaunch logic needed at all. The same line works for every instance on Prism, MultiMC, and the vanilla launcher.
Headless usage
Convert any mods folder without launching the game:
./gradlew runConverter --args="/path/to/.minecraft/mods"
Limitations
- Only b1.7.3 is supported by design, since Babric only targets b1.7.3.
- A Babric mod that fails dependency resolution crashes before RetroConvert can run; remove that jar manually.
- Don't restore an archived original next to its converted output the loader will see two mods with the same id.
License & Source
Source code, issue tracker, and full technical details are available on GitHub.
评论 0
登录后参与评分
还没有评论,来抢沙发吧