Record Class BlockElementRotation
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BlockElementRotation
public record BlockElementRotation(Vector3fc origin, BlockElementRotation.RotationValue value, boolean rescale, Matrix4fc transform)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Vector3fcThe field for theoriginrecord component.private final booleanThe field for therescalerecord component.private final Matrix4fcThe field for thetransformrecord component.private final BlockElementRotation.RotationValueThe field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBlockElementRotation(Vector3fc p_454819_, BlockElementRotation.RotationValue p_470664_, boolean p_455033_) BlockElementRotation(Vector3fc origin, BlockElementRotation.RotationValue value, boolean rescale, Matrix4fc transform) Creates an instance of aBlockElementRotationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static Vector3fccomputeRescale(Matrix4fc pTransformation) private static Matrix4fcomputeTransform(BlockElementRotation.RotationValue pValue, boolean pRescale) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.origin()Returns the value of theoriginrecord component.booleanrescale()Returns the value of therescalerecord component.private static floatscaleFactorForAxis(Matrix4fc pTransformation, Direction.Axis pAxis, Vector3f pScratchVector) final StringtoString()Returns a string representation of this record class.Returns the value of thetransformrecord component.value()Returns the value of thevaluerecord component.
-
Field Details
-
origin
The field for theoriginrecord component. -
value
The field for thevaluerecord component. -
rescale
private final boolean rescaleThe field for therescalerecord component. -
transform
The field for thetransformrecord component.
-
-
Constructor Details
-
BlockElementRotation
public BlockElementRotation(Vector3fc p_454819_, BlockElementRotation.RotationValue p_470664_, boolean p_455033_) -
BlockElementRotation
public BlockElementRotation(Vector3fc origin, BlockElementRotation.RotationValue value, boolean rescale, Matrix4fc transform) Creates an instance of aBlockElementRotationrecord class.- Parameters:
origin- the value for theoriginrecord componentvalue- the value for thevaluerecord componentrescale- the value for therescalerecord componenttransform- the value for thetransformrecord component
-
-
Method Details
-
computeTransform
private static Matrix4f computeTransform(BlockElementRotation.RotationValue pValue, boolean pRescale) -
computeRescale
-
scaleFactorForAxis
private static float scaleFactorForAxis(Matrix4fc pTransformation, Direction.Axis pAxis, Vector3f pScratchVector) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
rescale
public boolean rescale()Returns the value of therescalerecord component.- Returns:
- the value of the
rescalerecord component
-
transform
Returns the value of thetransformrecord component.- Returns:
- the value of the
transformrecord component
-