Record Class VRPlayerData
java.lang.Object
java.lang.Record
net.timtaran.interactivemc.util.vivecraft.VRPlayerData
- Record Components:
worldScale- the scaling factor for the world relative to the playerheightScale- the scaling factor for the player's heightvrPose- the current VR pose data
public record VRPlayerData(float worldScale, float heightScale, org.vivecraft.api.data.VRPose vrPose)
extends Record
Represents the VR data of a player in the Vivecraft mod.
This record contains the scaling factors and current VR pose of a player.
-
Constructor Summary
ConstructorsConstructorDescriptionVRPlayerData(float worldScale, float heightScale, org.vivecraft.api.data.VRPose vrPose) Creates an instance of aVRPlayerDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of theheightScalerecord component.final StringtoString()Returns a string representation of this record class.org.vivecraft.api.data.VRPosevrPose()Returns the value of thevrPoserecord component.floatReturns the value of theworldScalerecord component.
-
Constructor Details
-
VRPlayerData
public VRPlayerData(float worldScale, float heightScale, org.vivecraft.api.data.VRPose vrPose) Creates an instance of aVRPlayerDatarecord class.- Parameters:
worldScale- the value for theworldScalerecord componentheightScale- the value for theheightScalerecord componentvrPose- the value for thevrPoserecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
worldScale
public float worldScale()Returns the value of theworldScalerecord component.- Returns:
- the value of the
worldScalerecord component
-
heightScale
public float heightScale()Returns the value of theheightScalerecord component.- Returns:
- the value of the
heightScalerecord component
-
vrPose
public org.vivecraft.api.data.VRPose vrPose()Returns the value of thevrPoserecord component.- Returns:
- the value of the
vrPoserecord component
-