Record Class ComposedModelState
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.ComposedModelState
- All Implemented Interfaces:
ModelState, ModelStateExtension
public record ComposedModelState(ModelState parent, Transformation transformation)
extends Record
implements ModelState
Implementation of
ModelState which prepends an additional transform onto the incoming ModelState.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ModelStateThe field for theparentrecord component.private final TransformationThe field for thetransformationrecord component.Fields inherited from interface ModelState
NO_TRANSFORM -
Constructor Summary
ConstructorsConstructorDescriptionComposedModelState(ModelState parent, Transformation transformation) Creates an instance of aComposedModelStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.faceTransformation(Direction side) final inthashCode()Returns a hash code value for this object.parent()Returns the value of theparentrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransformationrecord component.Methods inherited from interface ModelStateExtension
mayApplyArbitraryRotation
-
Field Details
-
parent
The field for theparentrecord component. -
transformation
The field for thetransformationrecord component.
-
-
Constructor Details
-
ComposedModelState
Creates an instance of aComposedModelStaterecord class.- Parameters:
parent- the value for theparentrecord componenttransformation- the value for thetransformationrecord component
-
-
Method Details
-
faceTransformation
- Specified by:
faceTransformationin interfaceModelState
-
inverseFaceTransformation
- Specified by:
inverseFaceTransformationin interfaceModelState
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
transformation
Returns the value of thetransformationrecord component.- Specified by:
transformationin interfaceModelState- Returns:
- the value of the
transformationrecord component
-