Wiki 9Minecraft Wiki 9Minecraft

Overview

Java EditionModGuides 4FAQ 20Related mods 48
DownloadMixinBooter Mod

Get the files on 9Minecraft

MixinBooter

Allows any mixins that work on mods to work effortlessly on 1.8 - 1.12.2

  • Current Mixin Version: CleanMix 0.7.2 by CleanroomMC, a fork of SpongePowered/Fabric Mixin (0.8.7)

  • Current MixinExtra Version: 0.5.5 by CleanroomMC

For Developers ~ Getting Started:

  1. Add CleanroomMC's repository and depend on MixinBooter's maven entry:
repositories {
    maven {
        url ''
    }
}

dependencies {
    def mixin = 'zone.rong:mixinbooter:11.17'
    
    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)
}
  1. 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)

  • MixinConfigs manifest attribute: no loader class needed. Add a comma-separated list of your mixin configuration names to your jar's manifest. MixinBooter reads it straight from the jar's manifest and registers them.
  • MixinConnector manifest attribute: register configs programmatically. Point it at a class implementing org.spongepowered.asm.mixin.connect.IMixinConnector, its connect() is called during boot, where you call Mixins.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");
    }
    
}