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/07/24 13:08] – added "Applying changes without restarting Minecraft" fudge | tutorial:modding_tips [2026/01/24 23:01] (current) – [Mixins] Rephrase parentheses elaborating upon the term "chain" (phrasing inspired by flirora and skynotthelimit on Discord) 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 ===== | ||
| + | :!: //This segment will likely be removed from this page once it is ensured the information contained within it is detailed upon on more specialized pages.// | ||
| - | | + | 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 modify | + | Refer to relevant wikis and Discord help channels mentioned further in this section when you are in doubt or encounter |
| - | * @Redirect and @ModifyConstant mixins cannot | + | |
| - | * If you're adding custom fields or methods, especially if they' | + | * When needing to reference an instance of the target class in your Mixin and pass it to a method call or constructor, you cannot |
| + | * '' | ||
| + | * MixinExtras, | ||
| + | |||
| + | * If you're adding custom fields or methods to a target class, | ||
| + | |||
| + | To learn more on Mixins and how to use them, refer to [[tutorial: | ||
| ===== Networking ===== | ===== Networking ===== | ||
| Line 22: | Line 28: | ||
| * Packets always begin execution on the **network thread**, however accesses to most Minecraft things are not thread-safe. In general, if you're not exactly sure what you're doing, you want to parse the packet on the network thread (read all the values out), then use the **task queue** to perform additional operations on the **main server/ | * Packets always begin execution on the **network thread**, however accesses to most Minecraft things are not thread-safe. In general, if you're not exactly sure what you're doing, you want to parse the packet on the network thread (read all the values out), then use the **task queue** to perform additional operations on the **main server/ | ||
| + | ===== Pitfalls ===== | ||
| - | ===== Applying changes without restarting Minecraft ===== | + | * Avoid using the '' |
| - | Restarting Minecraft can take a hefty amount of time. Thankfully, there are tools that allow you to some apply changes while the game is running. | + | |
| - | ==== Reload changed classes ==== | + | |
| - | In Eclipse or Intellij IDEA, run Minecraft in debug mode. To apply changes in code, | + | |
| - | do '' | + | |
| - | Note: this only allows you to change method bodies. If you do any other kind of change, You will have to restart. | + | |
| - | However, if you use [[http:// | + | |
| - | ==== Reload textures ==== | + | |
| - | After you make a change in a texture ('' | + | |
tutorial/modding_tips.1563973739.txt.gz · Last modified: 2019/07/24 13:08 by fudge