You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to inject into doTick after the .collect call and pick up the List<Player>, so I used an INVOKE_ASSIGN injection with local capture. (This felt more appropriate than a modifyvariable, since I also needed to pick up a few method params.)
However, the local variable table didn't include list. The injector actually ended up targeting the CHECKCAST instruction before the local was assigned.
It looks like the AfterInvoke injector wants to advance over the INVOKE & over any _STORE instructions immediately following it, but the CHECKCAST got in the way.
Here's an assignment from
net.minecraft.world.entity.ai.sensing.TemptingSensor#doTick
(1.20.1 forge 47.1.3):The instruction stream for this assignment ends like this:
I wanted to inject into
doTick
after the.collect
call and pick up theList<Player>
, so I used anINVOKE_ASSIGN
injection with local capture. (This felt more appropriate than a modifyvariable, since I also needed to pick up a few method params.)However, the local variable table didn't include
list
. The injector actually ended up targeting theCHECKCAST
instruction before the local was assigned.It looks like the AfterInvoke injector wants to advance over the
INVOKE
& over any_STORE
instructions immediately following it, but theCHECKCAST
got in the way.Mixin/src/main/java/org/spongepowered/asm/mixin/injection/points/AfterInvoke.java
Lines 84 to 87 in 155314e
In this case it's workaroundable with
shift = At.Shift.BY, by = 2
or targeting a later part of the method.The text was updated successfully, but these errors were encountered: