MixinBooter
让任何适用于模组的 mixins 在 1.8 - 1.12.2 版本中轻松运行
-
当前 Mixin 版本:CleanMix 0.2.9 by CleanroomMC, a fork of SpongePowered/Fabric Mixin (0.8.7)
-
当前 MixinExtra 版本:0.5.4
伪更新日志:
-
从 4.2 版本开始,MixinBooter 的 API 发生了变化,所有使用 mixins 的模组都建议依赖 MixinBooter,即使那些 mixin 到 vanilla/forge/library 类中的模组也是如此。以避免因模组版本不匹配而导致尝试实现模组化 mixins 时崩溃(说的就是你,VanillaFix)。感谢 @embeddedt 推荐并帮助我引入此更改!
-
从 5.0 版本开始,MixinExtras by @LlamaLad7 已被 shaded。可供开发者使用。
-
从 8.0 版本开始,MixinBooter 现在将在 1.8 - 1.12.2 范围内工作。一个单一的构建即可兼容所有这些版本!(待办事项:支持 LiteLoader?)
-
从 8.4 版本开始,MixinBooter 积极尝试与 SpongeForge 兼容
-
从 9.2 版本开始,MixinBooter 重新引入了用于 1.8.x 版本的旧版 MixinLoader 注解。
-
从 10.0 版本开始,MixinBooter 遵循 Mixin 0.8.7
-
从 11.0 版本开始,MixinBooter 基于 CleanMix 构建。旨在与 Cleanroom 创建统一的后端。
- 您不再需要自行声明注解处理器的依赖项。
- 还添加了配置文件 (
config/mixinbooter.cfg) 以黑名单混入配置并切换调试选项 - 专用的
logs/mixinbooter.log混入日志。具备追踪类加载功能以实现精确调试。 - 允许传统的
MixinConfig+MixinConnectormanifest 属性条目完全融入生态系统 - 混入所有者的模组发现功能,更好的
isModLoaded检查 - 抑制 Forge 的 corrupt zip 警告
- 淘汰混入 "phases"
面向开发者 ~ 入门指南:
- 添加 CleanroomMC 的仓库并依赖 MixinBooter 的 maven 条目:
repositories {
maven {
url 'https://maven.cleanroommc.com'
}
}
dependencies {
def mixin = 'zone.rong:mixinbooter:11.0'
implementation (mixin) {
transitive = false
}
annotationProcessor mixin
// RetroFuturaGradle for refmap generation:
modUtils.enableMixins(mixin)
// modUtils.enableMixins(mixin, 'mod_id.mixins.refmap.json') << add refmap name as 2nd arg (optional)
}
- 选择如何注册您的混入配置。MixinBooter 支持多种方法:
(从 11.0 版本开始,早期/晚期划分已不存在,因此 IEarly/ILateMixinLoaders 已被弃用)
MixinConfigsmanifest 属性:无需加载器类。在 jar 的清单中添加空格分隔的混入配置名称列表。MixinBooter 直接从 jar 的清单中读取并注册它们。MixinConnectormanifest 属性:以编程方式注册配置。指向实现org.spongepowered.asm.mixin.connect.IMixinConnector的类,其connect()方法在启动期间被调用,您可以在其中自行调用Mixins.addConfiguration(...)。
这两个 manifest 属性均在您的 jar 任务上设置:
jar {
manifest {
attributes(
'MixinConfigs': 'mixins.mymod.json',
'MixinConnector': 'com.example.mymod.MyMixinConnector'
)
}
}
public class MyMixinConnector implements IMixinConnector {
@Override
public void connect() {
// Check if mod is loaded before registering?
// Possible with zone.rong.mixinbooter.service.ModDiscoverer.isModPresent(String modId)
Mixins.addConfiguration("mixins.mymod.json");
}
}
MixinBooter
Allows any mixins that work on mods to work effortlessly on 1.8 - 1.12.2
-
Current Mixin Version: CleanMix 0.2.9 by CleanroomMC, a fork of SpongePowered/Fabric Mixin (0.8.7)
-
Current MixinExtra Version: 0.5.4
Pseudo-Changelog:
-
As of 4.2, MixinBooter's API has changed and all mods that uses mixins are encouraged to depend on MixinBooter, even those that mixin into vanilla/forge/library classes. To avoid mixin version mismatches with mods crashing trying to implement modded mixins (looking at you VanillaFix). Thanks to @embeddedt recommending and helping me introduce this change!
-
As of 5.0, MixinExtras by @LlamaLad7 is shaded. Available for developers to use.
-
As of 8.0, MixinBooter will now work from 1.8 - 1.12.2. One single build works with all these versions! (TODO: LiteLoader support?)
-
As of 8.4, MixinBooter actively attempts to be compatible with SpongeForge
-
As of 9.2, MixinBooter reinstates the older MixinLoader annotation for 1.8.x usages.
-
As of 10.0, MixinBooter follows Mixin 0.8.7
-
As of 11.0, MixinBooter is built on CleanMix. As an effort to create an unified backend with Cleanroom.
- No longer would you need to declare dependencies for the annotation processor yourself.
- Also adds a config file (
config/mixinbooter.cfg) to blacklist mixin configs and toggle debug options - Dedicated
logs/mixinbooter.logmixin log. With ability to trace class-loading for precise debugging. - Allows traditional
MixinConfig+MixinConnectormanifest attribute entries to be fully involved in the ecosystem - Mod discovery for mixin owners, better
isModLoadedchecks - Suppresses Forge's corrupt zip warnings
- Phased out mixin "phases"
For Developers ~ Getting Started:
- Add CleanroomMC's repository and depend on MixinBooter's maven entry:
repositories {
maven {
url 'https://maven.cleanroommc.com'
}
}
dependencies {
def mixin = 'zone.rong:mixinbooter:11.0'
implementation (mixin) {
transitive = false
}
annotationProcessor mixin
// RetroFuturaGradle for refmap generation:
modUtils.enableMixins(mixin)
// modUtils.enableMixins(mixin, 'mod_id.mixins.refmap.json') << add refmap name as 2nd arg (optional)
}
- Pick how to register your mixin configurations. MixinBooter supports lots of approaches:
(As of 11.0, early/late divide is no longer present, therefore IEarly/ILateMixinLoaders are deprecated)
MixinConfigsmanifest attribute: no loader class needed. Add a space-separated list of your mixin configuration names to your jar's manifest. MixinBooter reads it straight from the jar's manifest and registers them.MixinConnectormanifest attribute: register configs programmatically. Point it at a class implementingorg.spongepowered.asm.mixin.connect.IMixinConnector, itsconnect()is called during boot, where you callMixins.addConfiguration(...)yourself.
Both manifest attributes are set on your jar task:
jar {
manifest {
attributes(
'MixinConfigs': 'mixins.mymod.json',
'MixinConnector': 'com.example.mymod.MyMixinConnector'
)
}
}
public class MyMixinConnector implements IMixinConnector {
@Override
public void connect() {
// Check if mod is loaded before registering?
// Possible with zone.rong.mixinbooter.service.ModDiscoverer.isModPresent(String modId)
Mixins.addConfiguration("mixins.mymod.json");
}
}
下载 MixinBooter
下载 MixinBooter
下载 MixinBooter
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MixinBooter
下载 MixinBooter
下载 MixinBooter
下载 MixinBooter
下载 MixinBooter
下载 MixinBooter
下载 MixinBooter
修复
- 恢复了正确的文件前缀
12.3 与 12.4 之间的完整更新日志:
新增
- 为 ABI 兼容性兼容类添加了废弃(Deprecated)注解
- 引入了新的兼容层(shims)
- 明确标注了 FB 的许可和致谢
12.2 与 12.3 之间的完整更新日志:
新增
- 向 ABI 兼容性适配类添加已弃用注解
- 引入新的适配方法
- 明确注明 FB 的许可与贡献
12.2 与 12.3 之间的完整更新日志:
修复
- 当模组声明远程版本范围时,
I18n出现NoClassDefFoundError
12.1 与 12.2 之间的完整更新日志:
新增
- 重定向使用 FermiumBooter 内置的 MixinSquared 的模组,以使用 CleanMix 0.9.0 的 MixinEdits API
修复
- 当核心模组自行调用
MixinExtrasBootstrap#init时出现的ClassCircularityError;现在会在任何其他核心模组加载之前引导 MixinExtras
更改
- 经过适当的基准测试和诊断后,模组发现速度提高了约 4 倍
- 跳过更常见的阴影库,例如 Minecraft、Forge、Netty 和 Apache 的库
- JAR 文件最多在 3 个线程上扫描,每 32 个 JAR 增加一个线程
- 类路径 JAR 仅在开发环境中被扫描
- 在模组发现期间找到
fermiumbooter的@MixinConfig类,因此不再需要第二次读取 JAR 文件来获取它们 - 更新 CleanMix 至 0.9.0
- 更新 MixinExtras,修复了方法期望不匹配的问题
12.0 与 12.1 之间的完整更新日志:
修复
- 在开发环境中调用某些类时导致的崩溃问题,增强了类加载器隔离性
变更
- 扩展了对使用其他 Gradle 插件的开发环境的检测支持
11.17 与 11.18 之间的完整更新日志:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧