mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
things actually pause when paused
This commit is contained in:
parent
03205c277b
commit
64b5683ac4
1 changed files with 6 additions and 2 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue