Package com.hammy275.immersivemc.client
Class LastClientVRData
java.lang.Object
com.hammy275.immersivemc.client.LastClientVRData
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addLastTick
(net.blf02.vrapi.api.data.IVRPlayer player) Adds new last tick entry.static boolean
static net.minecraft.world.phys.Vec3
Gets the change in position for velocity purposesstatic net.blf02.vrapi.api.data.IVRPlayer
getPlayer
(int ticksAgo) Get IVRPlayer from some ticks ago.static boolean
hasPlayerTicksAgo
(int ticksAgo)
-
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
Gets the change in position for velocity purposes- Returns:
- Vector3d representing x, y, and z velocity
-