User Tools

Site Tools


tutorial: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
Next revisionBoth sides next revision
tutorial:introduction [2019/11/03 23:07] – [Third Party APIs] layltutorial:introduction [2019/11/03 23:13] – [Adding Interfaces] layl
Line 25: Line 25:
 A good example of this is the "Registry" class, which lets you add blocks and items without any modifications to Minecraft's code. A good example of this is the "Registry" class, which lets you add blocks and items without any modifications to Minecraft's code.
  
-Minecraft will also load in the JSON data files from your mod+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.
-They're used for anything data-driven, where code isn't necessary in the first place.+
 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 68: Line 67:
 ==== Adding Interfaces ==== ==== Adding Interfaces ====
  
-This is probably the safest way to use mixins.+This is probably one of the safest ways to use mixins.
 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't change anything about the class, it only adds new things, and is therefore very unlikely to conflict. This doesn't change anything about the class, it only adds new things, and is therefore very unlikely to conflict.
 +
 +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