tutorial:mixin_registration
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tutorial:mixin_registration [2020/06/08 21:26] – created lvanderzande | tutorial:mixin_registration [2025/09/23 15:35] (current) – Rephrased naming convention section for mixin interfaces to no longer imply the I prefix for interfaces is standardized. Minor rephrasings. Fix internal link to accessor page containing "&" rather than "&" gauntrecluse | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ==== Introduction ==== | ==== Introduction ==== | ||
| - | In this example, you will learn how to register your Mixins through the '' | + | In this tutorial, you will learn how to register your Mixins through the '' |
| Inside your '' | Inside your '' | ||
| Line 19: | Line 19: | ||
| { | { | ||
| " | " | ||
| - | " | + | " |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | } | + | |
| ] | ] | ||
| } | } | ||
| </ | </ | ||
| - | Providing a String '' | + | Providing a String '' |
| - | + | ||
| - | Providing an Object allows for deeper customization. | + | |
| - | + | ||
| - | Taking a closer look at the Object from lines 4 to 7: | + | |
| - | + | ||
| - | <code json> | + | |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | } | + | |
| - | </ | + | |
| - | + | ||
| - | The '' | + | |
| - | + | ||
| - | The '' | + | |
| ==== Register Mixins ==== | ==== Register Mixins ==== | ||
| - | In the previous section, you learned about registering your client/ | + | In the previous section, you learned about registering your ''< |
| We still have to define which mixins to load and where these mixins are located. | We still have to define which mixins to load and where these mixins are located. | ||
| - | Inside your registered | + | A typical |
| <code json> | <code json> | ||
| Line 59: | Line 39: | ||
| " | " | ||
| " | " | ||
| - | " | + | " |
| " | " | ||
| " | " | ||
| " | " | ||
| ], | ], | ||
| + | " | ||
| " | " | ||
| " | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| } | } | ||
| } | } | ||
| </ | </ | ||
| - | The **2** main fields you should worry about when getting started with mixins are the '' | + | The **4** main fields you should worry about when getting started with mixins are the '' |
| + | |||
| + | * The '' | ||
| + | * The '' | ||
| + | * The '' | ||
| + | * The '' | ||
| + | |||
| + | Following that logic: '' | ||
| + | |||
| + | |||
| + | The other fields' | ||
| - | The '' | + | * The '' |
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * The main one to keep in mind is '' | ||
| + | * '' | ||
| + | * The main one to keep in mind is '' | ||
| - | The '' | + | There are other fields that can optionally be added, most of which only serve specific purposes that are outside of the scope of a general explanation. There is, however, one that is relevant for MixinExtras: |
| + | * '' | ||
| - | Following that logic: '' | ||
| + | :!: It is fine, especially if you are a beginner, to not necessarily understand the above fields fully. You should ask in the Fabric or SpongePowered Discord about clarifications on any of the concepts or fields you do not understand from this page. It may help improve your overall Mixin comprehension, | ||
| + | ---- | ||
| + | For further reading, check out the [[https:// | ||
tutorial/mixin_registration.1591651583.txt.gz · Last modified: 2020/06/08 21:26 by lvanderzande