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 14:05] – [Mixins] layltutorial:introduction [2019/11/03 14:20] – [Mixins] layl
Line 26: Line 26:
  
 Minecraft will also load in the JSON data files from your mod. Minecraft will also load in the JSON data files from your mod.
-These files are used for anything data-driven, where code isn't necessary in the first place.+These JSON files are injected by the Fabric API (not the loader!). 
 +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 65: Line 66:
 By preferring adding interfaces, you minimize the risk of conflicts by purely adding something to the class rather than changing it. By preferring adding interfaces, you minimize the risk of conflicts by purely adding something to the class rather than changing it.
  
-If you do have to use injections, **strongly** prefer additions over overwrites.+If you do have to use method injections, **strongly** prefer additions over "@Overwrite"-ing methods entirely.
 Overwrites are the most likely to conflict with other mods and in most situations you do not need them. Overwrites are the most likely to conflict with other mods and in most situations you do not need them.
 You can inject code into any part of a method, including wrapping inner method calls and canceling them. You can inject code into any part of a method, including wrapping inner method calls and canceling them.
tutorial/introduction.txt · Last modified: 2023/09/13 21:20 by 2001:8a0:f4d2:c700:98c:bb27:6ad8:1dab