Class LastClientVRData

java.lang.Object
com.hammy275.immersivemc.client.LastClientVRData

public class LastClientVRData extends Object
  • Constructor Details

    • LastClientVRData

      public LastClientVRData()
  • Method Details

    • addLastTick

      public static void addLastTick(net.blf02.vrapi.api.data.IVRPlayer player)
      Adds new last tick entry. Shouldn't be called by anything other than LastVRDataTracker.
      Parameters:
      player - IVRPlayer to add.
    • hasPlayerTicksAgo

      public static boolean hasPlayerTicksAgo(int ticksAgo)
      Parameters:
      ticksAgo - Ticks ago to check back.
      Returns:
      Whether we have data ticksAgo ticks back.
    • getPlayer

      public static net.blf02.vrapi.api.data.IVRPlayer getPlayer(int ticksAgo)
      Get IVRPlayer from some ticks ago.
      Parameters:
      ticksAgo - Ticks ago to retrieve. 0 retrieves the current tick and >5 throws as we only keep the past 5 ticks.
      Returns:
      The IVRPlayer for ticksAgo ticks ago.
    • canGetVelocityChange

      public static boolean canGetVelocityChange()
      Returns:
      Whether changeForVelocity can be run.
    • changeForVelocity

      public static net.minecraft.world.phys.Vec3 changeForVelocity(LastClientVRData.VRType type)
      Gets the change in position for velocity purposes
      Returns:
      Vector3d representing x, y, and z velocity