UniMixins
UniMixins 是一款专为 Minecraft 1.7.10(部分支持 1.8.9~1.12.2)设计的 Mixin 加载器,旨在实现最大程度的兼容性。它力求整合尽可能多的 Mixin 加载器的功能,其模块化特性使得在需要时也可以与其他加载器配合使用。
背景
在 1.7.10 中存在多种 Mixin 加载器,每种加载器除了提供基本的 Mixin 功能外,还提供了一套不同的额外功能,我们称之为 "extras"。
由于这些加载器都是单体式的,因不可避免的功能重叠,它们无法同时使用。为避免此问题,UniMixins 将每个功能作为独立的模块提供(但仍提供合并后的 jar 文件以方便使用)。
对比表
下表比较了已知 Mixin 加载器的功能集。
注意:更详细的版本可在 此处 查看。

- [NOP]: 不执行任何操作。(issue)
- [SEP]: 可作为单独的模组提供。
使用方法
下载 -all jar 文件,并将其放入你的 mods 目录中。移除任何其他冲突的 Mixin 加载器(参见上表)。
注意:jar 文件的命名必须确保其在字母顺序中排在最前面,以避免与嵌入 Mixin 的模组发生 排序问题。这就是为什么 jar 文件名以
+字符开头的原因。如果你遇到重命名 jar 文件的问题,可能需要将其改为!字符。供参考,一些显著字符的排序顺序如下:
!<+<0<[<_<a
高级用法
你也可以使用模块 jar 文件组装自己所需的模块组合。某些模块依赖于其他模块,请参阅 模块列表 部分。
假设没有其他 Mixin 加载器存在,你通常需要以下模块:
- Mixin(任意单个分支)
- Compat 和 Mixingasm(可选但强烈建议)
- 提供你所需要的任何 extras 的模块
如果缺少依赖项,游戏将会崩溃。这可以在配置文件中禁用。
模块列表
所有模块都依赖于 Mixin 模块。请注意,被依赖项不一定必须来自 UniMixins 模块,其他模组也可能用于提供它们。
包含在 all jar 中
- Mixin (UniMix): 提供由 UniMixins 开发者维护的 Mixin 分支,基于 Fabric 分支。
- SpongeMixins [仅限 1.7.10]: 提供对 SpongeMixins extras 的模拟。
- MixinBooterLegacy [仅限 1.7.10]: 提供对 MixinBooterLegacy extras 的模拟,以及一个重定位的 MixinExtras。
- MixinExtras: 提供 MixinExtras。
- GasStation [仅限 1.7.10]: 提供对 GasStation extras 的模拟。
- 依赖于 SpongeMixins。
- 依赖于 MixinBooterLegacy。
- 依赖于 MixinExtras
- GTNHMixins [仅限 1.7.10]: 提供对 GTNHMixins extras 的模拟,以及一个重定位的 MixinExtras。
- 依赖于 SpongeMixins。
- Compat: 各种兼容性调整:
- 重映射模组中对 Mixin 类(特别是阴影 ASM)的无效引用。
- 在崩溃报告中添加有关 mixin 的信息。[仅限 1.7.10]
- Mixingasm: 提高 Mixin 与 ASM 转换器的兼容性。
可选
- Future Compat [仅限 1.8.9+]: 使许多模块可在 1.8.9+ 上使用。要在 1.8+ 上运行此模组所必需。(Mixingasm 不需要。)
非常可选
这些不包含在发布版中,它们主要用于测试目的。(注意:你一次只能使用一个 Mixin 模块。)
- Mixin (SpongePowered): 提供 Mixin 的 上游分支。
- Mixin (Fabric): 提供 Mixin 的 Fabric 分支。
- Mixin (GasMix): 提供 Mixin 的 GasStation 分支。
- Mixin (GTNH): 提供 Mixin 的 GTNH 分支。
常见问题
为什么还要另一个 mixin 加载器?你没看过那个 xkcd 漫画吗?
在 UniMixins 创建之前,1.7.10 上的 Mixin 加载器碎片化严重,不同的模组需要不同的不兼容加载器。这部分原因是由于开发人员之间的冲突,另一部分原因是技术原因(加载器是以单体方式设计的,这会导致不兼容)。这个项目没有这些问题。
为什么你要使用 Fabric 的 Mixin 分支?这不是一个 Forge 模组吗?
Fabric 的 Mixin 分支比上游分支维护得更活跃,并且有一些额外的修复。Fabric 分支的大部分更改都不是 Fabric 特有的。
“extras” 到底有什么用呢?
- SpongeMixins、Grimoire、MixinBooterLegacy、GasStation 和 GTNHMixins 提供了多种方法,让你可以混入非核心模组(non-coremods)的类中。(这是 Mixin 原生不支持的功能,因为 Mixin 的所有阶段都在 Forge 发现非核心模组并将它们加入类路径之前发生。)
- MixinBooterLegacy、GasStation 和 GTNHMixins 添加了一个“延迟”(late)混合阶段,该阶段在第一个模组构造事件分发前立即触发。此时所有模组都已被发现。
- SpongeMixins 允许你通过文件名手动将模组提前添加到类路径中。这是一种古老且 hacky 的解决方案。
- 我们建议新模组使用 GTNHMixins,因为它是目前使用最广泛且维护最活跃的选项。
- Mixingasm 修复了 一个 Mixin 问题,该问题由于 Mixin 改变了 ASM 转换器的调用方式而导致部分 ASM 转换器失效。
- MixinExtras 添加了新的 Mixin 功能,使模组能够编写侵入性更低的混合代码。
Mixin?mixin?SpongeMixins?SpongePowered?有什么区别?
- Mixin:一个 Java 库,允许你以流畅的方式转换 Java 类。
- SpongePowered:创建 Mixin 的组织(他们也开发了一个名为 Sponge 的模组开发 API)。
- mixin:一种特殊的 Java 类,定义了应应用于某个类的“更改”。这些由 Mixin 应用。
- SpongeMixins:由 TimeConqueror 创建的 Mixin 加载器,其名称非常通用。
许可证
UniMixins 采用 Unlicense 许可证,但部分模块除外。完整详情请参阅 LICENSE。
UniMixins
UniMixins is a Mixin loader for Minecraft 1.7.10 (with partial 1.8.9~1.12.2 support) designed for maximum compatibility. It aims to combine the features of as many mixin loaders as possible, and its modular nature makes it possible to use along other loaders if desired.
Background
Numerous Mixin loaders exist for 1.7.10, and each one provides a differing set of extra features we refer to as "extras" on top of providing Mixin.
Since each of these loaders is monolithic, different ones cannot be used at the same time due to unavoidable feature overlap. To avoid this problem, UniMixins offers each feature as a separate module (but a combined jar is still provided for convenience).
Comparison table
Below is a table comparing the feature sets of known Mixin loaders.
Note: A more detailed version of this table is available here.

- [NOP]: Does not do anything. (issue)
- [SEP]: Is available as a separate mod.
Usage
Download the -all jar, and put it in your mods directory. Remove any other conflicting Mixin loaders (refer to the above table).
Note: It's important for the jar to be named so that it comes first alphabetically, to avoid a sorting issue with mods that embed Mixin. This is why the jar starts with a
+character. You may need to change this to a!character if you encounter issues with renamed jars.For reference, here is the sorting order of some notable characters:
!<+<0<[<_<a
Advanced usage
You can also assemble your own combination of modules using the module jars. Some modules depend on other modules, see the List of modules section.
Assuming no other Mixin loaders are present, you will generally want the following modules:
- Mixin (any single fork)
- Compat and Mixingasm (optional but highly recommended)
- Modules providing any extras you need
The game will crash if modules are missing dependencies. This can be disabled in the config.
List of modules
All modules depend on the Mixin module. Note that the dependents don't necessarily have to come from UniMixins modules, other mods may also be used to provide them.
Included in all-jar
- Mixin (UniMix): Provides a Mixin fork maintained by the UniMixins developers, based on the Fabric fork.
- SpongeMixins [1.7.10 only]: Provides an emulation of SpongeMixins's extras.
- MixinBooterLegacy [1.7.10 only]: Provides an emulation of MixinBooterLegacy's extras, and a relocated MixinExtras.
- MixinExtras: Provides MixinExtras.
- GasStation [1.7.10 only]: Provides an emulation of GasStation's extras.
- Depends on SpongeMixins.
- Depends on MixinBooterLegacy.
- Depends on MixinExtras
- GTNHMixins [1.7.10 only]: Provides an emulation of GTNHMixins's extras, and a relocated MixinExtras.
- Depends on SpongeMixins.
- Compat: Various compatibility tweaks:
- Remaps invalid references to Mixin classes (specifically the shaded ASM) in mods.
- Adds information about mixins to crash reports. [1.7.10 only]
- Mixingasm: Improves Mixin's compatibility with ASM transformers.
Optional
- Future Compat [1.8.9+ only]: Makes many of the modules usable on 1.8.9+. Needed to run the mod on 1.8+. (Not needed for Mixingasm.)
Very Optional
These are not included in releases, they mainly exist for testing purposes. (Note: You can only use a single Mixin module at the same time.)
- Mixin (SpongePowered): Provides the upstream fork of Mixin.
- Mixin (Fabric): Provides the Fabric fork of Mixin.
- Mixin (GasMix): Provides the GasStation fork of Mixin.
- Mixin (GTNH): Provides the GTNH fork of Mixin.
FAQ
Why another mixin loader? Haven't you seen that one xkcd strip?
Before UniMixins was created, there was far too much fragmentation among Mixin loaders on 1.7.10, with different mods requiring different incompatible loaders. This was partly due to conflicts between their developers, and partly because of technical reasons (the loaders were designed in a monolithic way, which invites incompatibility). This project has neither of those issues.
Why are you using the Fabric fork of Mixin? Isn't this a Forge mod?
The Fabric fork of Mixin is more actively maintained than the upstream fork, and has some extra fixes. Most of the Fabric fork's changes are not Fabric-specific.
What do the "extras" do anyway?
- SpongeMixins, Grimoire, MixinBooterLegacy, GasStation and GTNHMixins offer various ways to let you mix into the classes of non-coremods. (This is something Mixin does not natively support, since all of its phases occur before Forge discovers non-coremods and puts them on the classpath.)
- MixinBooterLegacy, GasStation and GTNHMixins add a "late" mixin phase that is fired right before the first mod construction event is dispatched. At this point all mods have been discovered.
- SpongeMixins lets you manually add mods to the classpath early using their file names. An old, hacky solution.
- We recommend new mods to use GTNHMixins as it's the most actively used and maintained option.
- Mixingasm fixes a Mixin issue that breaks some ASM transformers due to Mixin altering how they are called.
- MixinExtras adds new Mixin features that allow mods to write less intrusive mixins.
Mixin? mixin? SpongeMixins? SpongePowered? What's the difference?
- Mixin: a Java library that lets you transform Java classes in a fluent way.
- SpongePowered: the organization that created Mixin (who also developed a modding API called Sponge).
- mixin: a special Java class defining a "change" that should be applied to a class. These get applied by Mixin.
- SpongeMixins: a Mixin loader created by TimeConqueror that has a very generic name.
License
UniMixins is licensed under the Unlicense, with the exception of some modules. See LICENSE for the full details.
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
下载 UniMixins
更新内容
- 通过 @danyadev 在 修复 ASMRemapperTransformer
完整更新日志:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧