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/05/28 18:28] b0undarybreakertutorial:mixin_injects [2020/05/28 18:31] b0undarybreaker
Line 33: Line 33:
 | S | short | signed short | | S | short | signed short |
 | Z | boolean | ''true'' or ''false'' | | Z | boolean | ''true'' or ''false'' |
-| [FieldType | reference | one array dimension |+| [ | reference | one array dimension |
  
-A method descriptor is comprised of the method name, followed by a set of parentheses containing the input types, followed by the output type. A method defined in Java as ''Object m(int i, double d, Thread t)'' would have the method descriptor ''m(IDLjava/lang/Thread;)Ljava/lang/Object;''.+A method descriptor is comprised of the method name, followed by a set of parentheses containing the input types, followed by the output type. A method defined in Java as ''Object m(int i, double[] d, Thread t)'' would have the method descriptor ''m(I[DLjava/lang/Thread;)Ljava/lang/Object;''.
  
 //@Inject// methods always have a void return type. The method name does not matter; using something that describes what the inject does is best. The target method's arguments are placed first in the method's header, followed by a ''CallbackInfo'' object. If the target method has a return type (T), ''CallbackInfoReturnable<T>'' is used instead of ''CallbackInfo''. //@Inject// methods always have a void return type. The method name does not matter; using something that describes what the inject does is best. The target method's arguments are placed first in the method's header, followed by a ''CallbackInfo'' object. If the target method has a return type (T), ''CallbackInfoReturnable<T>'' is used instead of ''CallbackInfo''.
tutorial/mixin_injects.txt · Last modified: 2022/08/05 19:19 by clomclem