Package net.minecraft.client
Class DeltaTracker.Timer
java.lang.Object
net.minecraft.client.DeltaTracker.Timer
- All Implemented Interfaces:
DeltaTracker
- Enclosing interface:
DeltaTracker
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.DeltaTracker
DeltaTracker.DefaultValue, DeltaTracker.Timer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate floatprivate booleanprivate longprivate longprivate final floatprivate booleanprivate floatprivate floatprivate final it.unimi.dsi.fastutil.floats.FloatUnaryOperatorFields inherited from interface net.minecraft.client.DeltaTracker
ONE, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionTimer(float ticksPerSecond, long time, it.unimi.dsi.fastutil.floats.FloatUnaryOperator targetMsptProvider) -
Method Summary
Modifier and TypeMethodDescriptionprivate intadvanceGameTime(long time) private voidadvanceRealTime(long time) intadvanceTime(long time, boolean advanceGameTime) floatgetGameTimeDeltaPartialTick(boolean runsNormally) floatfloatprivate voidpause()private voidunPause()voidupdateFrozenState(boolean frozen) voidupdatePauseState(boolean paused)
-
Field Details
-
deltaTicks
private float deltaTicks -
deltaTickResidual
private float deltaTickResidual -
realtimeDeltaTicks
private float realtimeDeltaTicks -
pausedDeltaTickResidual
private float pausedDeltaTickResidual -
lastMs
private long lastMs -
lastUiMs
private long lastUiMs -
msPerTick
private final float msPerTick -
targetMsptProvider
private final it.unimi.dsi.fastutil.floats.FloatUnaryOperator targetMsptProvider -
paused
private boolean paused -
frozen
private boolean frozen
-
-
Constructor Details
-
Timer
public Timer(float ticksPerSecond, long time, it.unimi.dsi.fastutil.floats.FloatUnaryOperator targetMsptProvider)
-
-
Method Details
-
advanceTime
public int advanceTime(long time, boolean advanceGameTime) -
advanceGameTime
private int advanceGameTime(long time) -
advanceRealTime
private void advanceRealTime(long time) -
updatePauseState
public void updatePauseState(boolean paused) -
pause
private void pause() -
unPause
private void unPause() -
updateFrozenState
public void updateFrozenState(boolean frozen) -
getGameTimeDeltaTicks
public float getGameTimeDeltaTicks()- Specified by:
getGameTimeDeltaTicksin interfaceDeltaTracker
-
getGameTimeDeltaPartialTick
public float getGameTimeDeltaPartialTick(boolean runsNormally) - Specified by:
getGameTimeDeltaPartialTickin interfaceDeltaTracker
-
getRealtimeDeltaTicks
public float getRealtimeDeltaTicks()- Specified by:
getRealtimeDeltaTicksin interfaceDeltaTracker
-