public class ResourceLocation extends java.lang.Object implements java.lang.Comparable<ResourceLocation>
Modifier and Type | Class and Description |
---|---|
static class |
ResourceLocation.Serializer |
Modifier and Type | Field and Description |
---|---|
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
INVALID_EXCEPTION |
protected java.lang.String |
namespace |
protected java.lang.String |
path |
Modifier | Constructor and Description |
---|---|
|
ResourceLocation(java.lang.String resourceName) |
protected |
ResourceLocation(java.lang.String[] resourceParts) |
|
ResourceLocation(java.lang.String namespaceIn,
java.lang.String pathIn) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ResourceLocation p_compareTo_1_) |
static ResourceLocation |
create(java.lang.String resourceName,
char splitOn) |
protected static java.lang.String[] |
decompose(java.lang.String resourceName,
char splitOn) |
boolean |
equals(java.lang.Object p_equals_1_) |
java.lang.String |
getNamespace() |
java.lang.String |
getPath() |
int |
hashCode() |
private static boolean |
isPathValid(java.lang.String pathIn) |
static boolean |
isResouceNameValid(java.lang.String resourceName) |
private static boolean |
isValidNamespace(java.lang.String namespaceIn) |
static boolean |
isValidPathCharacter(char charIn) |
static ResourceLocation |
read(com.mojang.brigadier.StringReader reader) |
java.lang.String |
toString() |
static ResourceLocation |
tryCreate(java.lang.String string) |
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_EXCEPTION
protected final java.lang.String namespace
protected final java.lang.String path
protected ResourceLocation(java.lang.String[] resourceParts)
public ResourceLocation(java.lang.String resourceName)
public ResourceLocation(java.lang.String namespaceIn, java.lang.String pathIn)
public static ResourceLocation create(java.lang.String resourceName, char splitOn)
@Nullable public static ResourceLocation tryCreate(java.lang.String string)
protected static java.lang.String[] decompose(java.lang.String resourceName, char splitOn)
public java.lang.String getPath()
public java.lang.String getNamespace()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object p_equals_1_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(ResourceLocation p_compareTo_1_)
compareTo
in interface java.lang.Comparable<ResourceLocation>
public static ResourceLocation read(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static boolean isValidPathCharacter(char charIn)
private static boolean isPathValid(java.lang.String pathIn)
private static boolean isValidNamespace(java.lang.String namespaceIn)
public static boolean isResouceNameValid(java.lang.String resourceName)