Hi, I am trying to cancel the screen shake on take damage, keeping the red highlight. I have already tryed cancel the event and use player#setHealth(player#getHealth() - e#getDamage()) ..... it disables the hurt animation but 1 hit every 3 (approximately) makes player shake screen. I think I have to use packets to cancel this animation. Please help me. Thanks for the help and sorry for my bad English but not my main language.
@zioGiok You need to check if it is server side to start with, I think that it is client side to be honest.
@zioGiok When a player looses health, regardless of the cause, the screen will shake. You can't disable the shaking.
Trust me guys there is a way to do it... with ProtocolLib I have tryed to block packets of entity status and sometimes the first person cam don't shake. Please help me making it.
@timtower I don't care... it's okay for me remove both but when I disable packets sometimes works and sometimes not. Example: I hit a player, I see he don't shake and he don't become red (and it's okay for me), but the target player see his screen shaking only some hits. I want to disable the first person shake at all.
@zioGiok Then you intercept entity status for http://wiki.vg/Entities#Living when the status is the damage animation
@timtower I tryed it and as I said it works, but sometimes (completely random) the screen of the target shakes. I think because he loses life, but if I can block this animation sometimes I hope I can block it always...
If you cancel the EntityDamageEvent, and set the player's health using Damageable#setHealth(), you can avoid screenshake and a red flash. The only thing you have to deal with manually is calculating knockback.