Mixin Helper
掌控整合包中的模组冲突。Mixin Helper 允许你从单个 JSON 配置文件中,对任何已加载模组的 mixins(混合注入)进行黑名单过滤、优先级调整以及精确修改。无需编写代码、无需重新编译、也无需移除模组。
文档
完整文档、指南和示例请访问
⚠️ 风险自负 ⚠️
这是一款高级工具。如果你不了解 mixins 是什么或它们如何工作,本模组不适合你。
虽然 Mixin Helper 设有安全限制,但它会直接干扰其他模组对游戏的修补方式。使用不当 必然 会导致问题。包括但不限于:
- 游戏崩溃,且难以诊断的堆栈跟踪信息
- 模组功能损坏,可能不会立即显现
- 世界数据损坏,请在做出更改前备份你的世界
- 存档不兼容,如果禁用的 mixins 影响世界数据
如果你使用此工具修改了作者的 mixins,请不要向模组作者报告错误。 由 Mixin Helper 引起的任何问题由你自行负责。
功能
- Mixin 黑名单:禁用单个 mixin、整个 mixin 配置文件,或阻止所有针对特定类的 mixin
- 优先级控制:覆盖 mixin 执行顺序,以解决模组之间的加载顺序冲突
- 方法移除:在不禁用整个 mixin 的情况下,中和或移除特定的注入方法
- 审计报告:生成详细的 JSON 报告,列出每个已加载的 mixin 配置文件及其注解,以便快速诊断冲突
工作原理
- 安装 Mixin Helper,将 jar 文件放入
mods 文件夹
- 启动游戏,默认配置文件将在
config/mixinhelper.json 处生成
- 检查位于
config/mixinhelper-report.json 的审计报告,查看游戏中加载的所有 mixin
- 编辑配置文件,根据需要设置黑名单、重新排序优先级或剥离方法
- 重启游戏即可生效
快速示例
两个模组因修改同一类而崩溃?将引发问题的 mixin 加入黑名单:
{
"enabled": true,
"blacklist": {
"mixins": ["com.conflictingmod.mixin.MixinLevelRenderer"],
"mixinConfigs": [],
"targetClasses": []
}
}
需要更精细的控制?与其禁用整个 mixin,不如只中和单个注入的方法:
{
"methodRemovals": {
"rules": [
{
"targetClass": "net.minecraft.world.level.Level",
"method": "brokenMethod",
"action": "nop"
}
]
}
}
用例
- 整合包开发者:在等待模组作者修复之前,解决模组冲突
- 服务器管理员:禁用导致不稳定的特定模组行为
- 调试:排查导致崩溃或意外行为的 mixin
- 微调:通过控制执行顺序来优化模组间的交互
注意事项
- 配置更改需要完全重启游戏,因为 mixins 在游戏启动早期加载
- Mixin Helper 本身不包含 mixins,它利用 Mixin 插件系统来拦截其他模组
- 零运行时性能影响,所有处理均在启动期间完成
Mixin Helper
Take control of mixin conflicts in your modpack. Mixin Helper lets you blacklist, prioritize, and surgically modify mixins from any loaded mod, all from a single JSON config file. No code, no recompiling, no removing mods.
Documentation
Full documentation, guides, and examples at
⚠️ USE AT YOUR OWN RISK ⚠️
This is an advanced tool. If you don't know what mixins are or how they work, this mod is not for you.
While there are guardrails Mixin Helper directly interferes with how other mods patch the game. Incorrect use will break things. This includes but is not limited to:
- Game crashes with difficult-to-diagnose stacktraces
- Broken mod features that may not be immediately obvious
- World corruption, back up your worlds before making changes
- Incompatible save files if disabled mixins affect world data
Do NOT report bugs to mod authors if you have modified their mixins with this tool. Any issues caused by Mixin Helper are your responsibility.
Features
- Mixin Blacklisting: Disable individual mixins, entire mixin configs, or block all mixins targeting a specific class
- Priority Control: Override mixin execution order to resolve load-order conflicts between mods
- Method Removal: Neutralize or remove specific injected methods without disabling the entire mixin
- Audit Report: Generate a detailed JSON report of every loaded mixin config, including annotations, to diagnose conflicts fast
How It Works
- Install Mixin Helper, drop the jar in your
mods folder
- Launch the game, a default config is generated at
config/mixinhelper.json
- Check the audit report at
config/mixinhelper-report.json to see every mixin loaded in your game
- Edit the config to blacklist, reprioritize, or strip methods as needed
- Restart and you're done
Quick Example
Two mods crash because they both modify the same class? Blacklist the offending mixin:
{
"enabled": true,
"blacklist": {
"mixins": ["com.conflictingmod.mixin.MixinLevelRenderer"],
"mixinConfigs": [],
"targetClasses": []
}
}
Need finer control? Neutralize a single injected method instead of the whole mixin:
{
"methodRemovals": {
"rules": [
{
"targetClass": "net.minecraft.world.level.Level",
"method": "brokenMethod",
"action": "nop"
}
]
}
}
Use Cases
- Modpack developers resolving mod conflicts without waiting for mod authors to fix them
- Server admins disabling specific mod behaviors that cause instability
- Debugging which mixins are causing crashes or unexpected behavior
- Fine-tuning mod interactions by controlling execution order
Notes
- Config changes require a full game restart, mixins load very early in startup
- Mixin Helper itself has no mixins, it uses the Mixin plugin system to intercept other mods
- Zero runtime performance impact, all work is done during startup
评论 0
登录后参与评分
还没有评论,来抢沙发吧