tutorial:mixin_introduction
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:mixin_introduction [2025/11/21 00:24] – Rephrase and abbreviate some parts gauntrecluse | tutorial:mixin_introduction [2025/12/23 00:49] (current) – Rephrase around JVM bytecode to make it sound a bit less imperative to be able to properly understand JVM bytecode for Mixins gauntrecluse | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Introduction to Mixins (WIP) ====== | ====== Introduction to Mixins (WIP) ====== | ||
| Mixins are a powerful and important tool used in the Fabric ecosystem and other modding frameworks for Minecraft. Their primary use case is modifying existing code in the base game, | Mixins are a powerful and important tool used in the Fabric ecosystem and other modding frameworks for Minecraft. 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 **only Mixins written in Java are directly supported**, even if you use Kotlin or another language running on the Java Virtual Machine for the rest of your mod. Whilst it may be technically possible to use other JVM languages, there are currently no plans to support it or document such a process. Note that Kotlin in particular is directly incompatible with Mixin without providing additional compatibility layers. | + | whether it be through injecting custom logic, removing mechanics, or modifying values. Note that **only Mixins written in Java are directly supported**.((This applies |
| Mixin is a complex subsystem which uses a mod's Mixin classes | Mixin is a complex subsystem which uses a mod's Mixin classes | ||
| Line 9: | Line 9: | ||
| to transform the targeted classes' | to transform the targeted classes' | ||
| - | It is not recommended to try and learn how Mixin works or how to use it without prior knowledge of what Java bytecode is, as Mixin applies to bytecode rather than " | + | It is not recommended to try and learn how Mixin works or how to use it without prior knowledge of what Java bytecode is itself, as Mixin applies to bytecode rather than " |
| Similarly, Mixin and this documentation expects the user to already be familiar with [[tutorial: | Similarly, Mixin and this documentation expects the user to already be familiar with [[tutorial: | ||
| It is recommended to leverage the [[https:// | It is recommended to leverage the [[https:// | ||
| Line 33: | Line 34: | ||
| The Fabric Wiki offers several articles that provide practical examples and explanations of some areas of Mixin and MixinExtras: | The Fabric Wiki offers several articles that provide practical examples and explanations of some areas of Mixin and MixinExtras: | ||
| * [[tutorial: | * [[tutorial: | ||
| + | * [[https:// | ||
| * [[tutorial: | * [[tutorial: | ||
| - | * [[tutorial: | + | * [[tutorial: |
| * [[tutorial: | * [[tutorial: | ||
| + | * [[tutorial: | ||
| * [[tutorial: | * [[tutorial: | ||
| * [[tutorial: | * [[tutorial: | ||
| Line 41: | Line 44: | ||
| * [[tutorial: | * [[tutorial: | ||
| * [[tutorial: | * [[tutorial: | ||
| - | * [[tutorial: | + | * [[tutorial: |
| - | * [[tutorial:accesswideners|Access Widening]] | + | * [[tutorial:accesswidening|Access Widening]] |
| * [[tutorial: | * [[tutorial: | ||
| * [[tutorial: | * [[tutorial: | ||
| * [[tutorial: | * [[tutorial: | ||
tutorial/mixin_introduction.1763684655.txt.gz · Last modified: 2025/11/21 00:24 by gauntrecluse