User Tools

Site Tools


tutorial:mixin_introduction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:mixin_introduction [2025/11/30 01:11] – Rename Injects link to @Inject to fit the rewrite title. gauntreclusetutorial: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 9: Line 9:
 to transform the targeted classes' compiled Bytecode as the game runs("runtime"), but before the target class is loaded. to transform the targeted classes' compiled Bytecode as the game runs("runtime"), but before the target class is loaded.
  
-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 "source" code. It is also recommended to know how to read bytecode for your IDE of choice, as reading portions of the Bytecode may sometimes be necessary to use Mixin properly, such as when targeting anonymous classes, lambdas or code with a lot of "if-else" logic branching.\\+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 "source" code. It is also recommended to know how to access a class'bytecode for your IDE of choice, as reading portions of the Bytecode may sometimes be necessary to apply modifications properly, such as when targeting anonymous classes, lambdas or code with a lot of "if-else" logic branching. See [[https://docs.fabricmc.net/develop/mixins/bytecode|the Java Bytecode Docs page]] for a more extensive introduction on how to read and understand bytecode. 
 Similarly, Mixin and this documentation expects the user to already be familiar with [[tutorial:reading_mc_code|reading Minecraft and external source code]], and be able to set up an initial development environment, aswell as having an understanding of Java fundamentals. If, however, you specifically wish to skip to examples, be aware that it is expected for you to encounter difficulties and confusion in your learning process as you try to tackle more technical issues without learning some technical aspects, and you are likelier to need direct support or create Mixins that will be needlessly incompatible with other mods.\\ Similarly, Mixin and this documentation expects the user to already be familiar with [[tutorial:reading_mc_code|reading Minecraft and external source code]], and be able to set up an initial development environment, aswell as having an understanding of Java fundamentals. If, however, you specifically wish to skip to examples, be aware that it is expected for you to encounter difficulties and confusion in your learning process as you try to tackle more technical issues without learning some technical aspects, and you are likelier to need direct support or create Mixins that will be needlessly incompatible with other mods.\\
 It is recommended to leverage the [[https://mcdev.io/|Minecraft Development plugin by demonwav on IntelliJ]] (AKA MCDev) for Mixin development to benefit from its autocompletion, error highlighting, and utilities such as the MixinExtras Flow Diagram. It is recommended to leverage the [[https://mcdev.io/|Minecraft Development plugin by demonwav on IntelliJ]] (AKA MCDev) for Mixin development to benefit from its autocompletion, error highlighting, and utilities such as the MixinExtras Flow Diagram.
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:mixin_your_first_mixin|Tutorial: Making your first Mixin]]   * [[tutorial:mixin_your_first_mixin|Tutorial: Making your first Mixin]]
 +  * [[https://docs.fabricmc.net/develop/mixins/bytecode|Java Bytecode (Docs)]] 
   * [[tutorial:mixin_registration|Mixin registration]]   * [[tutorial:mixin_registration|Mixin registration]]
   * [[tutorial:mixin_injects|@Inject]]   * [[tutorial:mixin_injects|@Inject]]
   * [[tutorial:mixin_accessors|Accessors and Invokers]]   * [[tutorial:mixin_accessors|Accessors and Invokers]]
 +  * [[tutorial:mixin_override|Overriding a Mixin Target's parent]]
   * [[tutorial:mixin_redirectors|Redirectors]]   * [[tutorial:mixin_redirectors|Redirectors]]
     * [[tutorial:mixin_redirectors_methods|Method redirectors]]     * [[tutorial:mixin_redirectors_methods|Method redirectors]]
Line 41: Line 44:
   * [[tutorial:mixin_examples|Examples]]   * [[tutorial:mixin_examples|Examples]]
   * [[tutorial:mixin_hotswaps|Hotswapping Mixins]]   * [[tutorial:mixin_hotswaps|Hotswapping Mixins]]
-  * [[tutorial:mixin_export|Exporting Mixin Classes]]+  * [[tutorial:mixin_export|Exporting and Dumping Mixin Targets]]
   * [[tutorial:accesswidening|Access Widening]]   * [[tutorial:accesswidening|Access Widening]]
   * [[tutorial:reflection|Reflection]]   * [[tutorial:reflection|Reflection]]
   * [[tutorial:interface_injection|Interface Injection]]    * [[tutorial:interface_injection|Interface Injection]] 
   * [[tutorial:modding_tips|Modding Tips]]   * [[tutorial:modding_tips|Modding Tips]]
tutorial/mixin_introduction.1764465117.txt.gz · Last modified: 2025/11/30 01:11 by gauntrecluse