User Tools

Site Tools


tutorial:mixin_examples

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_examples [2020/09/14 05:28] – minor improvement siglongtutorial:mixin_examples [2021/01/12 14:13] ytg1234
Line 64: Line 64:
 </code> </code>
  
-===== Injecting into before method call =====+===== Injecting into the point before method call =====
 Mixin: Mixin:
 <code java> <code java>
Line 84: Line 84:
 </code> </code>
  
-===== Injecting into after method call =====+===== Injecting into the point after method call =====
 Mixin: Mixin:
 <code java> <code java>
Line 111: Line 111:
   at = @At(   at = @At(
     value = "INVOKE",     value = "INVOKE",
-    target = "La/b/c/Something;doSomething()V"), +    target = "La/b/c/Something;doSomething()V" 
-    slice = @Slice( +  ), 
-      from = @At(value = "INVOKE", target = "La/b/c/Something;doSomething2()V"), +  slice = @Slice( 
-      to = @At(value = "INVOKE", target = "La/b/c/Something;doSomething3()V")))+    from = @At(value = "INVOKE", target = "La/b/c/Something;doSomething2()V"), 
 +    to = @At(value = "INVOKE", target = "La/b/c/Something;doSomething3()V") 
 +  ) 
 +)
 private void injected(CallbackInfo ci) { private void injected(CallbackInfo ci) {
   doSomething5();   doSomething5();
tutorial/mixin_examples.txt · Last modified: 2024/01/13 15:02 by arkosammy12