TogAr2 / MinestomPvP

Combat library for Minestom
Apache License 2.0
78 stars 32 forks source link

Disable camera shift on hit #55

Open m4rekdev opened 2 hours ago

m4rekdev commented 2 hours ago

Hi, the player has their camera slightly moved for each hit. How can I disable this? ViaVersion solves this somehow.

TogAr2 commented 2 hours ago

Do you mean just the damage animation? It is also present in vanilla. I'm not sure what you are using viaversion for but older versions have a different animation so it could look different.

m4rekdev commented 1 hour ago

When a player gets knocked back their camera slightly shifts on newer versions. When running viaversion on a 1.8 spigot server and connecting to it on 1.21, the camera shift is not there. I would like the combat to be as close as possible to the 1.8 one.

m4rekdev commented 1 hour ago

(when legacyAttack is enabled of course)

TogAr2 commented 51 minutes ago

Using the latest commit, you should be able to fix your issue by using FinalDamageEvent.setAnimationType(AnimationType.LEGACY)