User Tools

Site Tools


tutorial:mixin_introduction

This is an old revision of the document!


FIXME The Mixin related pages of the Fabric Wiki are undergoing a more thorough review, and are subject to change, rewrites or being replaced. Many pages may be outdated or incomplete. It is strongly recommended to use the Fabric wiki and linked resources to get a rudimentary Mixin understanding, and then frequently ask questions in dedicated Mixin Support channels on the Fabric or SpongePowered Discord servers. Any help or feedback in amending pages on this topic is greatly appreciated.

“As for Mixins on the Fabric Wiki, it's one of the only good sources, but is also a bad source.” -The…Why…Even…How? AKA TWEH

Introduction to Mixins

Mixins are a powerful and important tool used in the Fabric ecosystem. Their primary use case is modifying existing code in the base game, whether it be through injecting custom logic, removing mechanics, or modifying values. Note that mixins must be written in Java, even if you use Kotlin or another language.

Since Fabric Loader 0.15, MixinExtras has become bundled in Fabric Loader, MixinExtras can be used to manipulate mixins in more compatibility-friendly ways.
Since Fabric Loader 0.17.0, MixinExtras 0.5.0 has become bundled in. It mainly adds the ability to target Expressions in source code for more precise targeting.

For a more accurate complete walkthrough on Mixin functionality, usage, and mechanics, view the Mixin Official Wiki. Additional documentation can be found in the Mixin Javadoc. MixinExtras features are documented on its Official Wiki.

The Fabric Wiki also offers several articles that provide practical examples and explanations:

tutorial/mixin_introduction.1758581439.txt.gz · Last modified: 2025/09/22 22:50 by gauntrecluse