Record Class ModelResourceLocation
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.ModelResourceLocation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceLocationThe field for theidrecord component.static final Stringprivate final StringThe field for thevariantrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionModelResourceLocation(ResourceLocation id, String variant) Creates an instance of aModelResourceLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.static ModelResourceLocationinventory(ResourceLocation p_343915_) private static StringlowercaseVariant(String p_248567_) toString()Returns a string representation of this record class.static ModelResourceLocationvariant()Returns the value of thevariantrecord component.
-
Field Details
-
id
The field for theidrecord component. -
variant
The field for thevariantrecord component. -
INVENTORY_VARIANT
- See Also:
-
-
Constructor Details
-
ModelResourceLocation
Creates an instance of aModelResourceLocationrecord class.- Parameters:
id- the value for theidrecord componentvariant- the value for thevariantrecord component
-
-
Method Details
-
vanilla
-
inventory
-
lowercaseVariant
-
getVariant
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
variant
Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-