Package net.minecraft.client.util
Class ModelIdentifier
java.lang.Object
net.minecraft.util.Identifier
net.minecraft.client.util.ModelIdentifier
- All Implemented Interfaces:
Comparable<Identifier>
@Environment(CLIENT) public class ModelIdentifier extends Identifier
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.util.Identifier
Identifier.Serializer -
Field Summary
Fields inherited from class net.minecraft.util.Identifier
CODEC, namespace, path -
Constructor Summary
Constructors Modifier Constructor Description ModelIdentifier(String id)Takes a string of the form<namespace>:<path>, for exampleminecraft:iron_ingot.protectedModelIdentifier(String[] id)ModelIdentifier(String namespace, String path)ModelIdentifier(Identifier id, String variant) -
Method Summary
Methods inherited from class net.minecraft.util.Identifier
compareTo, fromCommandInput, getNamespace, getPath, isCharValid, isPathCharacterValid, isValid, split, splitOn, tryParse
-
Field Details
-
variant
-
-
Constructor Details
-
ModelIdentifier
-
ModelIdentifier
Takes a string of the form
<namespace>:<path>, for exampleminecraft:iron_ingot.The string will be split (on the
Prefer using the:) into an identifier with the specified path and namespace.Identifier(java.lang.String, java.lang.String)constructor that takes the namespace and path as individual parameters to avoid mistakes.- Throws:
InvalidIdentifierException- if the string cannot be parsed as an identifier.
-
ModelIdentifier
-
ModelIdentifier
-
-
Method Details
-
split
-
getVariant
-
equals
- Overrides:
equalsin classIdentifier
-
hashCode
public int hashCode()- Overrides:
hashCodein classIdentifier
-
toString
- Overrides:
toStringin classIdentifier
-