Echo2007
即修改特定函数中instanceof的结果
wiki:https://jenkins.liteloader.com/v ... ction/Redirect.html
其中instanceof Redirect Mode有相关内容,但是没有具体用法
或者是否有其它方案

teddyxlandlee
ASM大法好()

火车撞鸟
Mixin 的文档一大缺点:你永远不知道你想要的东西的文档写在哪个类里
instanceof 和常量类似,都是通过 LDC 指令把 class 常量入栈,再通过 INSTANCEOF 比较
所以应该用 @At.value 应该填 "CONSTANT"

示例:
  1. @Redirect(
  2.     mathod = "xxxx",
  3.     at = @At(
  4.         value = "CONSTANT",
  5.         args = "classValue=com/example/ExcampleClass"
  6.     )
  7. )
复制代码


"CONSTANT" 的文档写在 BeforeConstant 里,里面有一句关键的话:This injection point searches for LDC and other constant opcodes matching its arguments and returns a list of injection points matching those instructions.

茵彼1nbee
mixin可以改变量吗?