Class VivecraftVRPlayerDataProvider
java.lang.Object
net.timtaran.interactivemc.bridge.vr.vivecraft.VivecraftVRPlayerDataProvider
- All Implemented Interfaces:
VRPlayerDataProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPoseHistory(net.minecraft.world.entity.player.Player player) @Nullable VRPosegetVrPose(net.minecraft.world.entity.player.Player player) Retrieves the VR player data for the given player.booleanisVRPlayer(net.minecraft.world.entity.player.Player player) Checks if the given player is a VR player.
-
Constructor Details
-
VivecraftVRPlayerDataProvider
public VivecraftVRPlayerDataProvider()
-
-
Method Details
-
getVrPose
Retrieves the VR player data for the given player.If the player is not a VR player, returns `null`.
If the player is a local player, retrieves data from the VRClientAPI instance.
If the player is a server player, retrieves data from the ServerVivePlayer instance.
If the player is a client player, retrieves data from the ClientVRPlayers instance.
- Specified by:
getVrPosein interfaceVRPlayerDataProvider- Parameters:
player- the player to retrieve the VR player data for- Returns:
- the VR player data, or
nullif the player is not a Vivecraft VR player
-
isVRPlayer
public boolean isVRPlayer(net.minecraft.world.entity.player.Player player) Description copied from interface:VRPlayerDataProviderChecks if the given player is a VR player.- Specified by:
isVRPlayerin interfaceVRPlayerDataProvider- Parameters:
player- the player to check- Returns:
trueif the player is a VR player,falseotherwise
-
getPoseHistory
- Specified by:
getPoseHistoryin interfaceVRPlayerDataProvider
-