Posted January 31, 20214 yr Hi, I was wondering if anyone could help me. When hit by a certain weapon, I want my custom mob to not flash red and to take less knockback than normal. I'm already cancelling LivingHurtEvent when the damage source is the weapon to make the mob not take damage, but I don't know how to do the other things. If I cancel LivingAttackEvent, it removes the damage, red flash, and knockback, which isn't what I want. Thanks! Edited January 31, 20214 yr by Linky132 I'm actually using LivingHurtEvent
January 31, 20214 yr Author Ah. So is there any alternative or will I have to create a mixin? Or could I apply knockback manually and cancel LivingAttackEvent?
January 31, 20214 yr Author I'm afraid I'd have no idea where to start with a PR. Are you sure there isn't some other way?
January 31, 20214 yr Author Alright, thanks for your help. I'm going to have a look at manually applying the knockback.
February 1, 20214 yr I'm currently also working on subduing the flash. My current idea is to save the hurt time in a capability befor the red flash happens and setting it to 0 (using LivingRenderEvent.Pre) and reset the hurttime after the rendering (using LivingRendereEvent.Post). I'll will admit, that this solution is kinda dirty, because I'm desyncronizing the hurttime on purpose.
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.