Posted April 20, 20214 yr This is a follow up to an earlier post about not being able to use the knockback method. Well, since then I've learned a bit more about the nature of my problem. It turns out that knockback DOES work, but the catch is if I cancel the LivingAttackEvent that I'm calling the code from, then all attempts to modify the velocity of the player are nullified, even if i extract the mojang knockback code and reuse it (which I don't want to do in the long run, for legal reasons). As soon as I stop canceling the event, the knockback works. Unfortunately, I NEED to cancel the event, since its the whole point of the mod. What could be causing this interaction??? Edited April 20, 20214 yr by theishiopian grammar
April 20, 20214 yr Author Absolutely! You're in luck, I have a git repo. I added comments in the problem section, the offending code is in EventHandler.java Repo: https://github.com/theishiopian/Parrying
April 21, 20214 yr Author Holy crap that actually worked! Thank you very much, I haven't seen hurtMarked documented or used anywhere!
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.