Record Class ModelResourceLocation
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.ModelResourceLocation
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
The field for theid
record component.static final String
private final String
The field for thevariant
record component. -
Constructor Summary
ConstructorDescriptionModelResourceLocation
(ResourceLocation id, String variant) Creates an instance of aModelResourceLocation
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.static ModelResourceLocation
inventory
(ResourceLocation p_343915_) private static String
lowercaseVariant
(String p_248567_) toString()
Returns a string representation of this record class.static ModelResourceLocation
variant()
Returns the value of thevariant
record component.
-
Field Details
-
id
The field for theid
record component. -
variant
The field for thevariant
record component. -
INVENTORY_VARIANT
- See Also:
-
-
Constructor Details
-
ModelResourceLocation
Creates an instance of aModelResourceLocation
record class.- Parameters:
id
- the value for theid
record componentvariant
- the value for thevariant
record 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 theid
record component.- Returns:
- the value of the
id
record component
-
variant
Returns the value of thevariant
record component.- Returns:
- the value of the
variant
record component
-