Remove screen shake

Discussion in 'Plugin Development' started by zioGiok, Sep 10, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    zioGiok

    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.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @zioGiok You need to check if it is server side to start with, I think that it is client side to be honest.
     
  3. Offline

    Zombie_Striker

    @zioGiok
    When a player looses health, regardless of the cause, the screen will shake. You can't disable the shaking.
     
  4. Offline

    zioGiok

    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.
     
  5. Offline

    timtower Administrator Administrator Moderator

  6. Offline

    zioGiok

  7. Offline

    timtower Administrator Administrator Moderator

    @zioGiok But the red screen and shake are connected
     
  8. Offline

    zioGiok

    @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.
     
  9. Offline

    timtower Administrator Administrator Moderator

  10. Offline

    zioGiok

    @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...
     
  11. Offline

    ipodtouch0218

    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.
     
Thread Status:
Not open for further replies.

Share This Page