Record Class BedrockActorFrame
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.render.BedrockActorFrame
public record BedrockActorFrame(float seconds, float bodyYaw, double cameraOffsetX, double cameraOffsetY, double cameraOffsetZ)
extends Record
Immutable camera and authoritative actor inputs for one submitted frame.
-
Constructor Summary
ConstructorsConstructorDescriptionBedrockActorFrame(float seconds, float bodyYaw, double cameraOffsetX, double cameraOffsetY, double cameraOffsetZ) Creates an instance of aBedrockActorFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatbodyYaw()Returns the value of thebodyYawrecord component.doubleReturns the value of thecameraOffsetXrecord component.doubleReturns the value of thecameraOffsetYrecord component.doubleReturns the value of thecameraOffsetZrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input(net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot actor) floatrotationToCamera(int axis) floatseconds()Returns the value of thesecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BedrockActorFrame
public BedrockActorFrame(float seconds, float bodyYaw, double cameraOffsetX, double cameraOffsetY, double cameraOffsetZ) Creates an instance of aBedrockActorFramerecord class.- Parameters:
seconds- the value for thesecondsrecord componentbodyYaw- the value for thebodyYawrecord componentcameraOffsetX- the value for thecameraOffsetXrecord componentcameraOffsetY- the value for thecameraOffsetYrecord componentcameraOffsetZ- the value for thecameraOffsetZrecord component
-
-
Method Details
-
input
public BedrockActorAnimation.Frame input(net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot actor) -
rotationToCamera
public float rotationToCamera(int axis) -
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
seconds
public float seconds()Returns the value of thesecondsrecord component.- Returns:
- the value of the
secondsrecord component
-
bodyYaw
public float bodyYaw()Returns the value of thebodyYawrecord component.- Returns:
- the value of the
bodyYawrecord component
-
cameraOffsetX
public double cameraOffsetX()Returns the value of thecameraOffsetXrecord component.- Returns:
- the value of the
cameraOffsetXrecord component
-
cameraOffsetY
public double cameraOffsetY()Returns the value of thecameraOffsetYrecord component.- Returns:
- the value of the
cameraOffsetYrecord component
-
cameraOffsetZ
public double cameraOffsetZ()Returns the value of thecameraOffsetZrecord component.- Returns:
- the value of the
cameraOffsetZrecord component
-