Mixin is a trait/mixin framework for Java using ASM and hooking into the runtime classloading process via a set of pluggable built-in or user-provided

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-12-28 02:30:35

Mixin is a trait/mixin framework for Java using ASM and hooking into the runtime classloading process via a set of pluggable built-in or user-provided services. Built-in services currently support Mojang's LegacyLauncher system, though this is deprecated in favour of ModLauncher by cpw, which has greater extensibility and has support for Java 8 and later.

Additional documentation for individual features and annotations can be found in the extensive Javadoc. For additional help use the channel #mixin on the Sponge Discord Server.

For handling obfuscation tasks, Mixin provides an Annotation Processor which works at compile time to generate obfuscation mappings for your toolchain to apply. If using Gradle 5 or later, annotation processors are no longer automatically loaded from compile configurations and must be specified explicitly via annotationProcessor configurations. For this purpose, Mixin provides "fat jar" artefacts containing all required dependencies via the :processor classifier. For example if your build uses the dependency org.spongepowered:mixin:1.2.3 then your annotationProcessor configuration should specify dependency org.spongepowered:mixin:1.2.3:processor.

If you are using Mixin in a Minecraft Forge project then the MixinGradle plugin can be used to simplify the configuration of the Mixin Annotation Processor. It provides a simple syntax for configuring the Mixin AP for your project, see the MixinGradle README for how to configure MixinGradle.

Leave a Comment