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

    Constructors
    Constructor
    Description
    BedrockActorFrame(float seconds, float bodyYaw, double cameraOffsetX, double cameraOffsetY, double cameraOffsetZ)
    Creates an instance of a BedrockActorFrame record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the bodyYaw record component.
    double
    Returns the value of the cameraOffsetX record component.
    double
    Returns the value of the cameraOffsetY record component.
    double
    Returns the value of the cameraOffsetZ record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    input(net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot actor)
     
    float
    rotationToCamera(int axis)
     
    float
    Returns the value of the seconds record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BedrockActorFrame

      public BedrockActorFrame(float seconds, float bodyYaw, double cameraOffsetX, double cameraOffsetY, double cameraOffsetZ)
      Creates an instance of a BedrockActorFrame record class.
      Parameters:
      seconds - the value for the seconds record component
      bodyYaw - the value for the bodyYaw record component
      cameraOffsetX - the value for the cameraOffsetX record component
      cameraOffsetY - the value for the cameraOffsetY record component
      cameraOffsetZ - the value for the cameraOffsetZ record component
  • Method Details

    • input

      public BedrockActorAnimation.Frame input(net.raphimc.viabedrock.api.model.NativeActorMessage.Snapshot actor)
    • rotationToCamera

      public float rotationToCamera(int axis)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • seconds

      public float seconds()
      Returns the value of the seconds record component.
      Returns:
      the value of the seconds record component
    • bodyYaw

      public float bodyYaw()
      Returns the value of the bodyYaw record component.
      Returns:
      the value of the bodyYaw record component
    • cameraOffsetX

      public double cameraOffsetX()
      Returns the value of the cameraOffsetX record component.
      Returns:
      the value of the cameraOffsetX record component
    • cameraOffsetY

      public double cameraOffsetY()
      Returns the value of the cameraOffsetY record component.
      Returns:
      the value of the cameraOffsetY record component
    • cameraOffsetZ

      public double cameraOffsetZ()
      Returns the value of the cameraOffsetZ record component.
      Returns:
      the value of the cameraOffsetZ record component