Record Class TransformationComponent

java.lang.Object
java.lang.Record
org.geysermc.geyser.api.block.custom.component.TransformationComponent
Record Components:
rx - The rotation on the x axis
ry - The rotation on the y axis
rz - The rotation on the z axis
sx - The scale on the x axis
sy - The scale on the y axis
sz - The scale on the z axis
tx - The translation on the x axis
ty - The translation on the y axis
tz - The translation on the z axis

public record TransformationComponent(int rx, int ry, int rz, float sx, float sy, float sz, float tx, float ty, float tz) extends Record
This class is used to store the transformation component of a block
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransformationComponent(int rx, int ry, int rz)
    Constructs a new TransformationComponent with the rotation values and assumes default scale and translation
    TransformationComponent(int rx, int ry, int rz, float sx, float sy, float sz)
    Constructs a new TransformationComponent with the rotation and scale values and assumes default translation
    TransformationComponent(int rx, int ry, int rz, float sx, float sy, float sz, float tx, float ty, float tz)
    Creates an instance of a TransformationComponent record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    rx()
    Returns the value of the rx record component.
    int
    ry()
    Returns the value of the ry record component.
    int
    rz()
    Returns the value of the rz record component.
    float
    sx()
    Returns the value of the sx record component.
    float
    sy()
    Returns the value of the sy record component.
    float
    sz()
    Returns the value of the sz record component.
    final String
    Returns a string representation of this record class.
    float
    tx()
    Returns the value of the tx record component.
    float
    ty()
    Returns the value of the ty record component.
    float
    tz()
    Returns the value of the tz record component.

    Methods inherited from class java.lang.Object

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

    • TransformationComponent

      public TransformationComponent(int rx, int ry, int rz)
      Constructs a new TransformationComponent with the rotation values and assumes default scale and translation
      Parameters:
      rx - The rotation on the x axis
      ry - The rotation on the y axis
      rz - The rotation on the z axis
    • TransformationComponent

      public TransformationComponent(int rx, int ry, int rz, float sx, float sy, float sz)
      Constructs a new TransformationComponent with the rotation and scale values and assumes default translation
      Parameters:
      rx - The rotation on the x axis
      ry - The rotation on the y axis
      rz - The rotation on the z axis
      sx - The scale on the x axis
      sy - The scale on the y axis
      sz - The scale on the z axis
    • TransformationComponent

      public TransformationComponent(int rx, int ry, int rz, float sx, float sy, float sz, float tx, float ty, float tz)
      Creates an instance of a TransformationComponent record class.
      Parameters:
      rx - the value for the rx record component
      ry - the value for the ry record component
      rz - the value for the rz record component
      sx - the value for the sx record component
      sy - the value for the sy record component
      sz - the value for the sz record component
      tx - the value for the tx record component
      ty - the value for the ty record component
      tz - the value for the tz record component
  • Method Details

    • 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 '=='.
      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.
    • rx

      public int rx()
      Returns the value of the rx record component.
      Returns:
      the value of the rx record component
    • ry

      public int ry()
      Returns the value of the ry record component.
      Returns:
      the value of the ry record component
    • rz

      public int rz()
      Returns the value of the rz record component.
      Returns:
      the value of the rz record component
    • sx

      public float sx()
      Returns the value of the sx record component.
      Returns:
      the value of the sx record component
    • sy

      public float sy()
      Returns the value of the sy record component.
      Returns:
      the value of the sy record component
    • sz

      public float sz()
      Returns the value of the sz record component.
      Returns:
      the value of the sz record component
    • tx

      public float tx()
      Returns the value of the tx record component.
      Returns:
      the value of the tx record component
    • ty

      public float ty()
      Returns the value of the ty record component.
      Returns:
      the value of the ty record component
    • tz

      public float tz()
      Returns the value of the tz record component.
      Returns:
      the value of the tz record component