User Tools

Site Tools


tutorial:mixin_injects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:mixin_injects [2020/06/15 21:00] – fixed the Fabric Example Mod repo link lvanderzandetutorial:mixin_injects [2020/08/26 04:55] – Add a note on constructor descriptor siglong
Line 47: Line 47:
  
 === Injecting into Constructors === === Injecting into Constructors ===
-To inject into a constructor, use ''<init>()V'' as the method target, with ''()'' containing the constructor argument descriptors. When injecting into constructors, ''@At'' must be set to either ''TAIL'' or ''RETURN''.+To inject into a constructor, use ''<init>()V'' as the method target, with ''()'' containing the constructor argument descriptors. When injecting into constructors, ''@At'' must be set to either ''TAIL'' or ''RETURN''Note that some classes have methods named ''init'' which are different from ''<init>''. Don't get confused!
  
 ===== Practical Example ===== ===== Practical Example =====
tutorial/mixin_injects.txt · Last modified: 2022/08/05 19:19 by clomclem