Fixed head interpolating incorrectly when going into an animation.

This commit is contained in:
Luis C.M committed 2024-02-24 16:52:28 -06:00
1 parent 514e14e13d
commit f27c548dff
1 file changed
+7 -5
@@ -232,14 +232,16 @@ public abstract class MixinModelRenderer {
part.prevRotations[2] = part.prevRotations[2] * (1.0F - speed) + (this.rotateAngleZ * speed);
}
if (animDataActive || (partType != EnumAnimationPart.HEAD
&& ClientEventHandler.renderingPlayer.getAge() - animData.finishedTime < 20)) {
if (animDataActive ||
ClientEventHandler.renderingPlayer.getAge() - animData.finishedTime < 20) {
this.rotationPointX = originalPart.pivot[0] + part.prevPivots[0];
this.rotationPointY = originalPart.pivot[1] + part.prevPivots[1];
this.rotationPointZ = originalPart.pivot[2] + part.prevPivots[2];
this.rotateAngleX = part.prevRotations[0];
this.rotateAngleY = part.prevRotations[1];
this.rotateAngleZ = part.prevRotations[2];
if (animDataActive || partType != EnumAnimationPart.HEAD) {
this.rotateAngleX = part.prevRotations[0];
this.rotateAngleY = part.prevRotations[1];
this.rotateAngleZ = part.prevRotations[2];
}
}
} else {
this.rotateAngleZ += part.prevRotations[2];