You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minecraft 1.19.4 slightly changed the way the hurt animation works when you take damage. 1.19.4 includes a "Yaw" parameter, which slightly changes the way the hurt animation looks. For example, if you punch a player from the left side, the hurt animation from their perspective will look slightly different than if you punched from the right. Before 1.19.4, all hurt animations would look the same.
This can be seen on the wiki page for the Minecraft protocol:
The 1.19.3 protocol would send an "entity animation" packet (link) while the 1.19.4 protocol sends a "hurt animation" packet which includes a "Yaw" parameter (link).
Proposed solution
ProtocolLib could be used to intercept all "hurt animation" packets and then make them look like the old animation. After doing some testing, it seems that the old animation can be achieved by setting the Yaw value to 0 every time.
Alternative solutions
This maybe could also be done without ProtocolLib by using because Spigot/Paper exposes the methods LivingEntity.playHurtAnimation() and Player.sendHurtAnimation(). Another thing to note is that, after playing around with these methods, I noticed that the Yaw value is displaced by 90 degrees when the packet is actually sent. So, when calling playHurtAnimation(10f), the actual packet would give a Yaw value of 100. So to get the old behavior, you need to do playHurtAnimation(-90f).
The text was updated successfully, but these errors were encountered:
Problem
Minecraft 1.19.4 slightly changed the way the hurt animation works when you take damage. 1.19.4 includes a "Yaw" parameter, which slightly changes the way the hurt animation looks. For example, if you punch a player from the left side, the hurt animation from their perspective will look slightly different than if you punched from the right. Before 1.19.4, all hurt animations would look the same.
This can be seen on the wiki page for the Minecraft protocol:
The 1.19.3 protocol would send an "entity animation" packet (link) while the 1.19.4 protocol sends a "hurt animation" packet which includes a "Yaw" parameter (link).
Proposed solution
ProtocolLib could be used to intercept all "hurt animation" packets and then make them look like the old animation. After doing some testing, it seems that the old animation can be achieved by setting the Yaw value to
0
every time.Alternative solutions
This maybe could also be done without ProtocolLib by using because Spigot/Paper exposes the methods
LivingEntity.playHurtAnimation()
andPlayer.sendHurtAnimation()
. Another thing to note is that, after playing around with these methods, I noticed that the Yaw value is displaced by 90 degrees when the packet is actually sent. So, when callingplayHurtAnimation(10f)
, the actual packet would give a Yaw value of100
. So to get the old behavior, you need to doplayHurtAnimation(-90f)
.The text was updated successfully, but these errors were encountered: