MixinBooter Mod — Guide
Technical Specifications
MixinBooter is built upon a specialized fork of the Mixin library to ensure maximum stability in older Minecraft versions.
Core Components
-
UniMix: The mod utilizes UniMix (currently version 0.15.3), a fork maintained by CleanroomMC. This version is derived from the Mixin 0.8.7 branch, providing modern features to legacy versions of the game.
-
Cross-Version Support: A unique feature of MixinBooter is its single-build architecture. The same JAR file is compatible across all versions from Minecraft, simplifying installation for users and dependency management for developers.
Mechanics and Loading Paths
MixinBooter categorizes code injections into two distinct paths based on when the target classes are loaded by the game. Understanding these paths is essential for proper mod functionality.
| Loading Path | Target Classes | Implementation Interface |
|---|---|---|
| Early Loading | Vanilla Minecraft, Forge, Guava, and other core libraries. | IEarlyMixinLoader |
| Late Loading | Standard mod classes and late-initialized game components. | ILateMixinLoader |
Early Mixin Loading
This path is used for modifications that must occur before the game fully initializes. Developers implementing this must create a coremod using IFMLLoadingPlugin and implement the IEarlyMixinLoader interface. This ensures that the Mixins are applied as soon as the classloader encounters the target classes.
Late Mixin Loading
This is the standard path for most mod-to-mod interactions. It allows a mod to inject code into another mod's classes. By implementing ILateMixinLoader, a mod can register its Mixin configurations to be applied after all mods have been identified but before they are fully initialized.
Developer Integration
For mod developers, MixinBooter is integrated via Maven. It supports both standard ForgeGradle and the modern RetroFuturaGradle toolchains.
Dependency Setup
Developers must add the CleanroomMC repository and include the following dependencies in their build.gradle file:
repositories {
maven { url '' }
}
dependencies {
// Common Annotation Processors
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
annotationProcessor 'com.google.guava:guava:32.1.2-jre'
annotationProcessor 'com.google.code.gson:gson:2.8.9'
// MixinBooter Implementation
implementation ('zone.rong:mixinbooter:10.7') { transitive = false }
annotationProcessor ('zone.rong:mixinbooter:10.7') { transitive = false }
}
Implementation Example
To register Mixin configurations, a developer must return a list of config paths through the getMixinConfigs method in their loader class:
public class MyModMixinLoader implements ILateMixinLoader {
@Override
public List<String> getMixinConfigs {
return Arrays.asList("mixins.mymod.json");
}
}