tutorial:introduction
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:introduction [2019/11/03 23:10] – [Native Minecraft APIs] layl | tutorial:introduction [2019/11/03 23:20] – layl | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Introduction to Modding with Fabric | + | ====== Introduction to Modding with Fabric ====== |
This is a quick introduction to some common techniques you can use while making Fabric mods. | This is a quick introduction to some common techniques you can use while making Fabric mods. | ||
Line 26: | Line 26: | ||
Minecraft also uses JSON data files for various data-driven features. | Minecraft also uses JSON data files for various data-driven features. | ||
- | These JSON files are injected by the Fabric API (not the loader!). | + | You can add JSON files to your mod, which are then injected by the Fabric API. |
For example, block models and loot tables are implemented through JSON files. | For example, block models and loot tables are implemented through JSON files. | ||
Line 67: | Line 67: | ||
==== Adding Interfaces ==== | ==== Adding Interfaces ==== | ||
- | This is probably the safest | + | This is probably |
New interface implementations can be added to any Minecraft class. | New interface implementations can be added to any Minecraft class. | ||
You can then access the interface by casting the class to it. | You can then access the interface by casting the class to it. | ||
This doesn' | This doesn' | ||
+ | |||
+ | One caveat is that the function signature (name + parameter types) you inject must be unique. So if you use common parameter types, be sure to give it a very unique name. | ||
tutorial/introduction.txt · Last modified: 2023/09/13 21:20 by 2001:8a0:f4d2:c700:98c:bb27:6ad8:1dab