Class Timer

java.lang.Object
net.minecraft.src.Timer

public class Timer extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
    How much time has elapsed since the last tick, in ticks (range: 0.0 - 1.0).
    int
    How many full ticks have turned over since the last call to updateTimer(), capped at 10.
    float
    How much time has elapsed since the last tick, in ticks, for use by display rendering routines (range: 0.0 - 1.0).
    float
    A multiplier to make the timer (and therefore the game) go faster or slower. 0.5 makes the game run at half- speed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Timer(float par1)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    void
     
    void
    setTimerSpeedTarget(float timerSpeed)
     
    void
    Updates all fields of the Timer using the current time

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • elapsedTicks

      public int elapsedTicks
      How many full ticks have turned over since the last call to updateTimer(), capped at 10.
    • renderPartialTicks

      public float renderPartialTicks
      How much time has elapsed since the last tick, in ticks, for use by display rendering routines (range: 0.0 - 1.0). This field is frozen if the display is paused to eliminate jitter.
    • timerSpeed

      public float timerSpeed
      A multiplier to make the timer (and therefore the game) go faster or slower. 0.5 makes the game run at half- speed.
    • elapsedPartialTicks

      public float elapsedPartialTicks
      How much time has elapsed since the last tick, in ticks (range: 0.0 - 1.0).
  • Constructor Details

    • Timer

      public Timer(float par1)
  • Method Details

    • updateTimer

      public void updateTimer()
      Updates all fields of the Timer using the current time
    • resetTimerSpeed

      public void resetTimerSpeed()
    • getTimerSpeed

      public float getTimerSpeed()
    • setTimerSpeedTarget

      public void setTimerSpeedTarget(float timerSpeed)