You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I managed to do it by overriding the "doHurtTarget" method.
@Override
public boolean doHurtTarget(Entity target) {
this.swing(InteractionHand.MAIN_HAND);
return super.doHurtTarget(target);
}
As of version 1.20.1, they wrote the entire network section, so networkEvent no longer exists. If you specify exactly what you wanted to do, I could help you better.
I used the fully qualified name and it still didn't work. I decided to get a bytecode shower and I noticed there was no mention to the method I was targeting. It was inside a lambda expression.
I tried another method outside the expression and it worked.
Edit: the reason was that it injected code AFTER the method call. I didn't notice the "need to store value" thing. I switched to INVOKE with a shift to AFTER
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.