Package org.vivecraft.api
Interface VRAPI
public interface VRAPI
The main interface for interacting with Vivecraft from common code.
- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescriptiongetHistoricalVRPoses(net.minecraft.world.entity.player.Player player) Returns the history of VR poses for the player.getVRPose(net.minecraft.world.entity.player.Player player) Returns the VR pose for the given player.static VRAPIinstance()Gets API instance for interacting with Vivecraft's common APIbooleanisVRPlayer(net.minecraft.world.entity.player.Player player) Check whether a given player is currently in VR.
-
Method Details
-
instance
Gets API instance for interacting with Vivecraft's common API- Returns:
- The Vivecraft API instance for interacting with Vivecraft's common API.
- Since:
- 1.3.0
-
isVRPlayer
boolean isVRPlayer(net.minecraft.world.entity.player.Player player) Check whether a given player is currently in VR.- Parameters:
player- The player to check the VR status of.- Returns:
- true if the player is in VR.
- Since:
- 1.3.0
-
getVRPose
Returns the VR pose for the given player. Will returnnullif the player isn't in VR, or if no data for the player has been received yet. The VRPose can still benullifisVRPlayer(Player)returned true, since those two properties are independent of each other.- Parameters:
player- Player to get the VR pose of.- Returns:
- The VR pose for a player, or
nullif the player isn't in VR or no data has been received for said player. - Since:
- 1.3.0
-
getHistoricalVRPoses
Returns the history of VR poses for the player. If one only needs the history for the local player, this can be more conveniently called usingVRClientAPI.getHistoricalVRPoses().
Note that due to the inherent latency of networking, historical VR data retrieved either by the server or by the client for a client other than the local player may be unideal.- Parameters:
player- Player to get the VR pose history of.- Returns:
- The history of VR poses for the player. Will be
nullif the player isn't in VR or if VR-specific data hasn't been received. - Since:
- 1.3.0
-