tutorial:modding_tips
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:modding_tips [2019/08/19 19:43] – [Pitfalls] Clarify AWT jamieswhiteshirt | tutorial:modding_tips [2025/09/22 16:23] (current) – [Mixins] Readjust some phrasing gauntrecluse | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| * Due to the injection-based approach of Fabric' | * Due to the injection-based approach of Fabric' | ||
| - | * Block.Settings -> FabricBlockSettings | + | * Block.Settings -> FabricBlockSettings |
| * EntityType.Builder -> FabricEntityTypeBuilder | * EntityType.Builder -> FabricEntityTypeBuilder | ||
| - | * While an official configuration system is being worked on, one replacement for now is to use Java .properties or JSON. | ||
| * For a built-in resource pack or data pack, please ensure that an " | * For a built-in resource pack or data pack, please ensure that an " | ||
| ===== Mixins ===== | ===== Mixins ===== | ||
| + | |||
| + | It should be kept in mind whenever learning about Mixin in **any** capacity that any example is limited to its own situation. No example should be directly copied, and you should prioritize using examples as ways to better understand syntax and general principles, rather than a tutorial to achieve your specific goal. //Every// Mixin you make should be tailored to its isolated use-case.\\ | ||
| + | Refer to relevant wikis and Discord help channels mentioned further in this section when you are in doubt or encounter an issue, getting direct help and asking questions is a natural and expected part of learning Mixins and should be prioritized when there is no obvious Wiki answer. This being kept in mind, the following are loose, general advice for using Mixin in your project. | ||
| * To cast a class to an interface it doesn' | * To cast a class to an interface it doesn' | ||
| - | | + | * @Redirect and @ModifyConstant mixins cannot currently be nested (applied by more than one mod in the same area at the same time). This might change later in development - however, for now, alongside @Overwrite, please avoid them if possible |
| - | | + | * MixinExtras, a library for Mixin bundled |
| - | * If you're adding custom fields or methods, especially if they' | + | |
| + | * If you're adding non-private custom fields or methods to a target class, prefix them with " | ||
| + | * To learn more on Mixins and how to use them, refer to [[tutorial: | ||
| ===== Networking ===== | ===== Networking ===== | ||
| Line 24: | Line 27: | ||
| ===== Pitfalls ===== | ===== Pitfalls ===== | ||
| - | * Avoid using the `java.awt` package and its subpackages. AWT does not work well on all systems. Several users have reported that it tends to hang Minecraft. | + | * Avoid using the '' |
tutorial/modding_tips.1566243794.txt.gz · Last modified: 2019/08/19 19:43 by jamieswhiteshirt