Package dev.oxydien.mathimations.model
Record Class ModelInfo
java.lang.Object
java.lang.Record
dev.oxydien.mathimations.model.ModelInfo
- Record Components:
root- The main root of the model. This is the starting point for accessing other parts.children- A list of strings representing the names of the children (accessible) within the model hierarchy. If a child part has sub-children, use a forward slash ("/") to separate their names. For example:["neck", "neck/head", "neck/head/left_ear", "neck/head/right_ear", "body"]The code will search for the names in sequence from left to right, so parent parts can be omitted if they are part of child definitions. For example:["neck/head/left_ear", "neck/head/right_ear", "body"] // neck and head are within ear definitions
public record ModelInfo(net.minecraft.client.model.geom.ModelPart root, List<String> children)
extends Record
Constructs a new
ModelInfo object with the given root part and list of child names.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.getInfo(net.minecraft.client.model.geom.ModelPart root) Tries to construct a newModelInfoobject from the given root part.final inthashCode()Returns a hash code value for this object.net.minecraft.client.model.geom.ModelPartroot()Returns the value of therootrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
getInfo
Tries to construct a newModelInfoobject from the given root part.- Parameters:
root- The root part of the model- Returns:
- A new
ModelInfoobject or an empty optional if the root part is null
-
getPartNames
-
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 withObjects::equals(Object,Object). -
root
public net.minecraft.client.model.geom.ModelPart root()Returns the value of therootrecord component.- Returns:
- the value of the
rootrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-