Record Class BlockElementRotation.SingleAxisRotation
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BlockElementRotation.SingleAxisRotation
- All Implemented Interfaces:
BlockElementRotation.RotationValue
- Enclosing class:
BlockElementRotation
public static record BlockElementRotation.SingleAxisRotation(Direction.Axis axis, float angle)
extends Record
implements BlockElementRotation.RotationValue
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for theanglerecord component.private final Direction.AxisThe field for theaxisrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSingleAxisRotation(Direction.Axis axis, float angle) Creates an instance of aSingleAxisRotationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatangle()Returns the value of theanglerecord component.axis()Returns the value of theaxisrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
axis
The field for theaxisrecord component. -
angle
private final float angleThe field for theanglerecord component.
-
-
Constructor Details
-
SingleAxisRotation
Creates an instance of aSingleAxisRotationrecord class.- Parameters:
axis- the value for theaxisrecord componentangle- the value for theanglerecord component
-
-
Method Details
-
transformation
- Specified by:
transformationin interfaceBlockElementRotation.RotationValue
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
axis
Returns the value of theaxisrecord component.- Returns:
- the value of the
axisrecord component
-
angle
public float angle()Returns the value of theanglerecord component.- Returns:
- the value of the
anglerecord component
-