things actually pause when paused

This commit is contained in:
JozsefA 2021-01-13 13:24:45 -08:00
parent 03205c277b
commit 64b5683ac4

View File

@ -7,12 +7,16 @@ public class AnimationTickHolder {
public static int ticks; public static int ticks;
public static void tick() { public static void tick() {
ticks++; if (!Minecraft.getInstance().isGamePaused()) ticks++;
} }
public static float getRenderTick() { public static float getRenderTick() {
return ticks + getPartialTicks();
}
public static float getPartialTicks() {
Minecraft mc = Minecraft.getInstance(); Minecraft mc = Minecraft.getInstance();
return ticks + (mc.isGamePaused() ? mc.renderPartialTicksPaused : mc.getRenderPartialTicks()); return (mc.isGamePaused() ? mc.renderPartialTicksPaused : mc.getRenderPartialTicks());
} }
} }