Small fix to animations: still running when using render ticks when the game is paused

This commit is contained in:
Luis C.M committed 2024-01-08 00:15:19 -06:00
1 parent 782f21f1fe
commit 8340ae7311
2 files changed
+2 -2

No files matched your search

@@ -108,7 +108,7 @@ public class ClientEventHandler {
ClientEventHandler.playerModel = null;
}
if (data != null && data.isActive()) {
if (data != null && data.isActive() && !Minecraft.getMinecraft().isGamePaused()) {
Animation animation = data.animation;
if (data.isActive() && animation.currentFrame().useRenderTicks()) {
animation.increaseTime();
@@ -155,7 +155,7 @@ public abstract class MixinModelRenderer {
part.prevRotations[2] = part.prevRotations[2] * (1.0F - speed) + (this.rotateAngleZ * speed);
}
if (animDataActive || (ClientEventHandler.renderingPlayer.getAge() - animData.finishedTime < 20)) {
if (animDataActive || (partType != EnumAnimationPart.HEAD && 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];