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 axisry- The rotation on the y axisrz- The rotation on the z axissx- The scale on the x axissy- The scale on the y axissz- The scale on the z axistx- The translation on the x axisty- The translation on the y axistz- 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
ConstructorsConstructorDescriptionTransformationComponent(int rx, int ry, int rz)Constructs a new TransformationComponent with the rotation values and assumes default scale and translationTransformationComponent(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 translationTransformationComponent(int rx, int ry, int rz, float sx, float sy, float sz, float tx, float ty, float tz)Creates an instance of aTransformationComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.intrx()Returns the value of therxrecord component.intry()Returns the value of theryrecord component.intrz()Returns the value of therzrecord component.floatsx()Returns the value of thesxrecord component.floatsy()Returns the value of thesyrecord component.floatsz()Returns the value of theszrecord component.toString()Returns a string representation of this record class.floattx()Returns the value of thetxrecord component.floatty()Returns the value of thetyrecord component.floattz()Returns the value of thetzrecord component.
-
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 axisry- The rotation on the y axisrz- 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 axisry- The rotation on the y axisrz- The rotation on the z axissx- The scale on the x axissy- The scale on the y axissz- 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 aTransformationComponentrecord class.- Parameters:
rx- the value for therxrecord componentry- the value for theryrecord componentrz- the value for therzrecord componentsx- the value for thesxrecord componentsy- the value for thesyrecord componentsz- the value for theszrecord componenttx- the value for thetxrecord componentty- the value for thetyrecord componenttz- the value for thetzrecord 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. All components in this record class are compared with '=='. -
rx
public int rx()Returns the value of therxrecord component.- Returns:
- the value of the
rxrecord component
-
ry
public int ry()Returns the value of theryrecord component.- Returns:
- the value of the
ryrecord component
-
rz
public int rz()Returns the value of therzrecord component.- Returns:
- the value of the
rzrecord component
-
sx
public float sx()Returns the value of thesxrecord component.- Returns:
- the value of the
sxrecord component
-
sy
public float sy()Returns the value of thesyrecord component.- Returns:
- the value of the
syrecord component
-
sz
public float sz()Returns the value of theszrecord component.- Returns:
- the value of the
szrecord component
-
tx
public float tx()Returns the value of thetxrecord component.- Returns:
- the value of the
txrecord component
-
ty
public float ty()Returns the value of thetyrecord component.- Returns:
- the value of the
tyrecord component
-
tz
public float tz()Returns the value of thetzrecord component.- Returns:
- the value of the
tzrecord component
-