module-mixinbooterlegacy
基本信息
| 属性 | 值 |
|---|---|
| modid | mixinbooterlegacy |
| Java 文件 | 22(本仓最大模块) |
| 加载插件 | io.github.tox1cozz.mixinbooterlegacy.MixinBooterLegacyPlugin |
| mixin 配置 | mixin.mixinbooterlegacy.json(未列入 manifest) |
| 作者 | Rongmario / tox1cozZ |
| 产出 | …-mixinbooterlegacy-1.7.10.jar |
| 启用版本 | Minecraft 1.7.10 |
功能
MixinBooter 的 1.7.10 移植。mcmod.info 自述
UniMixins module that provides MixinBooterLegacy extras and MixinExtras with MixinBooterLegacy's package name.
致谢写明 Thanks Rongmario for a MixinBooter on Minecraft 1.12.2.
它是本仓文件最多的模块,且内含 module-mixinextras 所缺的全部注入器实现。
⚠️ 唯一的 @Mod 不在独立文件里
// MixinBooterLegacyPlugin.java:86
@Mod(modid = "mixinbooterlegacy", name = "MixinBooterLegacy",
version = "@VERSION@", acceptableRemoteVersions = "*")
⚠️ @Mod 注解写在 MixinBooterLegacyPlugin.Container 这个
public static class 嵌套类上(:86),
而不是像其它模块那样有独立的顶层 XxxModule.java。
按「找 XxxModule.java」的常规流程会漏掉这个 modid。
⚠️ 本模块确实有 MixinBooterLegacyModule.java,
但它没有 @Mod,只是被 *Core 调用的静态 init() 工具类
(内部调 SanityCheckHelper.warnIfJarPrefixesExist(["mixinbooterlegacy-"]))。
名字带 Module 容易被误认为 mod 入口。
⚠️ 同样,module-gasstation 的
GasStationModule.java 也没有 @Mod ——
gasstation 的 @Mod 在 GasStation.java:5。
两个模块的 *Module 类都是幌子。
结构分组
| 分组 | 内容 |
|---|---|
loader/mixin/ |
LoadControllerMixin(本模块唯一 @Mixin)、LoadController 相关 |
mixinextras/ |
12 文件 / 4 注入器,见 MixinExtras 注入器 |
| 其余 | MixinBooterLegacyPlugin、Loader / Controller 实现、shade 兼容层 |
⚠️ 它同时是 MixinExtras 的实现所在
mixinextras/injector/ 下三个注入器的父类构造分别传入字符串:
| 注入器 | 传入的注解名 |
|---|---|
ModifyReceiverInjector |
"@ModifyReceiver" |
ModifyExpressionValueInjector |
"@ModifyExpressionValue" |
ModifyReturnValueInjector |
"@ModifyReturnValue" |
即 module-mixinextras 只有 2 个文件(空 @Mod + Core),
真正的 MixinExtras 实现在本模块。
mixin 配置
| 项 | 值 |
|---|---|
| 文件 | mixin.mixinbooterlegacy.json |
package |
io.github.tox1cozz.mixinbooterlegacy.loader.mixin |
required |
true |
minVersion |
0.8 |
refmap |
mixin.mixinbooterlegacy.refmap.json |
mixins |
1 个:LoadControllerMixin |
plugin |
无 |
⚠️ 该 json 未出现在本模块 manifest 的 MixinConfigs 中
(module-mixinbooterlegacy/build.gradle 的 attributes 块里只有
TweakClass / ForceLoadAsMod / FMLCorePluginContainsFMLMod / FMLCorePlugin)。
它如何被激活需看 MixinBooterLegacyPlugin 的加载逻辑,
不能据 manifest 断言「本模块不应用 mixin」。
⚠️ mixin.mixinbooterlegacy.refmap.json 与配置 json 同在
src/main/resources/ 根目录,而其它模块的 refmap 命名统一为
mixins.<模块>.refmap.json(复数 mixins.)。本模块是 mixin. 单数,
按 mixins.mixinbooterlegacy.* 搜文件会搜不到。
实现要点
- 本模块 manifest 没有
MixinConfigs、没有Premain-Class(与 module-all、module-mixin 不同)。 relocate 'io.github.legacymoddingmc.unimixins.common'→…unimixins.mixinbooterlegacy.repackage.common。LoadControllerMixin的目标是LoadController(remap = false), 是本模块的核心 mixin。同一目标类也被 LateMixinOrchestrationMixin(gtnhmixins) 与 module-gasstation 的LoadControllerMixin混用 —— 3 个模块各有 1 个针对LoadController的 mixin。
相关条目
- 模块总览 - 10 模块对照
- module-mixinextras - 包装本模块的注入器
- mixin 配置对照 - 4 个配置的
required与minVersion - LoadControllerMixin - 本模块唯一 mixin
- MixinExtras 注入器 - 本模块内的 MixinExtras 实现
- 组件完整性检查 - 本模块缺失会导致硬失败