what 's this ? a parameterised at ? surely not ! org.spongepowered.asm.mixin.injection.points.methodhead head and org.spongepowered.asm.mixin.injection.points.beforereturn return are only two of the available values for at types and are themost straightforward to understand . head only ever makes a single injection at the head of the method and return injects before every return opcode in a method . other injection types are available however : org.spongepowered.asm.mixin.injection.points.beforeinvoke invoke searches for method invocations matching its parameters and injects immediately prior to any matching invocations org.spongepowered.asm.mixin.injection.points.beforefieldaccess field searches for field accesses get or set matching its parameters and injects immediately prior to any matching access org.spongepowered.asm.mixin.injection.points.beforenew new searches for object instantiation new keywords matching its parameters and injects prior to the new opcode org.spongepowered.asm.mixin.injection.points.beforestringinvoke invoke_string is a specialised version of invoke which searches for a method invocation of a method which accepts a single string argument and also matches the specified string literal . this is very useful for finding calls to profiler : : startsection with a particular argument . org.spongepowered.asm.mixin.injection.points.jumpinsnpoint jump searches for specific jump opcodes fully-qualified class name allows you to specify a custom class which extends org.spongepowered.asm.mixin.injection.injectionpoint to implement any customlogic you wish the specific arguments accepted by each type of invokation are described in each class 's javadoc . this example shows a simple use of the invoke type . this is what the code in the target method looks like : this.worldobj = worldin ; this.terraintype = worldin.getworldinfo . getterraintype ; this.generatorsettings = worldin.getworldinfo . getgeneratoroptions ; / / we want to inject a callback to our method here , immediately prior to calling registerworldchunkmanager this.registerworldchunkmanager ; this.generatelightbrightnesstable ; having identified the target method , we simply supply the method name as the target argument to the at annotation . notethat unlike the method parameter which must refer to a method in the target class the target parameter for the at must be a fully-qualified member reference include both the owner and signature because the obfuscation processor requires this information in order to look up the target member in the obfuscation tables . concode_field_sep PlaceHolder placeHolder concode_field_sep void onConstructed concode_elem_sep void onGetFogColor concode_elem_sep void onCanCoordinateBeSpawn
void function ( World arg0 , CallbackInfo arg1 ) { }