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 float
private float
private boolean
private long
private long
private final float
private boolean
private float
private float
private final it.unimi.dsi.fastutil.floats.FloatUnaryOperator
Fields 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 int
advanceGameTime
(long time) private void
advanceRealTime
(long time) int
advanceTime
(long time, boolean advanceGameTime) float
getGameTimeDeltaPartialTick
(boolean runsNormally) float
float
private void
pause()
private void
unPause()
void
updateFrozenState
(boolean frozen) void
updatePauseState
(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:
getGameTimeDeltaTicks
in interfaceDeltaTracker
-
getGameTimeDeltaPartialTick
public float getGameTimeDeltaPartialTick(boolean runsNormally) - Specified by:
getGameTimeDeltaPartialTick
in interfaceDeltaTracker
-
getRealtimeDeltaTicks
public float getRealtimeDeltaTicks()- Specified by:
getRealtimeDeltaTicks
in interfaceDeltaTracker
-