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 revision
Previous 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/09/05 10:55] – Reorganize tutorials 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''. No other forms of injection are officially supported. Note that some classes have methods named ''init'' which are different from ''<init>''. Don't get confused! 
 + 
 +To inject into a static constructor, use ''<clinit>'' as the method name.
  
 ===== Practical Example ===== ===== Practical Example =====
tutorial/mixin_injects.txt · Last modified: 2022/08/05 19:19 by clomclem