Record Class CameraInstruction.Spline

java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.CameraInstruction.Spline
Enclosing class:
CameraInstruction

public static record CameraInstruction.Spline(float totalTime, int type, List<CameraInstruction.Vec3> curve, List<CameraInstruction.Progress> progress, List<CameraInstruction.Rotation> rotations, String identifier, boolean loadFromJson) extends Record
  • Constructor Details

    • Spline

      public Spline(float totalTime, int type, List<CameraInstruction.Vec3> curve, List<CameraInstruction.Progress> progress, List<CameraInstruction.Rotation> rotations, String identifier, boolean loadFromJson)
      Creates an instance of a Spline record class.
      Parameters:
      totalTime - the value for the totalTime record component
      type - the value for the type record component
      curve - the value for the curve record component
      progress - the value for the progress record component
      rotations - the value for the rotations record component
      identifier - the value for the identifier record component
      loadFromJson - the value for the loadFromJson record component
  • Method Details

    • compile

      public CameraSplineProgram compile()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • totalTime

      public float totalTime()
      Returns the value of the totalTime record component.
      Returns:
      the value of the totalTime record component
    • type

      public int type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • curve

      public List<CameraInstruction.Vec3> curve()
      Returns the value of the curve record component.
      Returns:
      the value of the curve record component
    • progress

      public List<CameraInstruction.Progress> progress()
      Returns the value of the progress record component.
      Returns:
      the value of the progress record component
    • rotations

      public List<CameraInstruction.Rotation> rotations()
      Returns the value of the rotations record component.
      Returns:
      the value of the rotations record component
    • identifier

      public String identifier()
      Returns the value of the identifier record component.
      Returns:
      the value of the identifier record component
    • loadFromJson

      public boolean loadFromJson()
      Returns the value of the loadFromJson record component.
      Returns:
      the value of the loadFromJson record component