@Environment(value=CLIENT) public class ModelIdentifier extends Identifier
Identifier.Serializer| Modifier and Type | Field and Description |
|---|---|
private String |
variant |
CODEC, namespace, path| Modifier | Constructor and Description |
|---|---|
|
ModelIdentifier(Identifier id,
String variant) |
|
ModelIdentifier(String id)
Takes a string of the form
<namespace>:<path>, for example minecraft:iron_ingot. |
protected |
ModelIdentifier(String[] id) |
|
ModelIdentifier(String namespace,
String path) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
String |
getVariant() |
int |
hashCode() |
protected static String[] |
split(String id) |
String |
toString() |
compareTo, fromCommandInput, getNamespace, getPath, isCharValid, isPathCharacterValid, isValid, split, splitOn, tryParseprivate final String variant
protected ModelIdentifier(String[] id)
public ModelIdentifier(String id)
Takes a string of the form <namespace>:<path>, for example minecraft:iron_ingot.
The string will be split (on 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.InvalidIdentifierException - if the string cannot be parsed as an identifier.public ModelIdentifier(Identifier id, String variant)
public String getVariant()
public boolean equals(Object object)
equals in class Identifierpublic int hashCode()
hashCode in class Identifierpublic String toString()
toString in class Identifier