Package net.minecraft.resources
Class ResourceLocation
java.lang.Object
net.minecraft.resources.ResourceLocation
- All Implemented Interfaces:
Comparable<ResourceLocation>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ResourceLocation> static final String
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private final String
static final char
private final String
static final String
static final StreamCodec
<io.netty.buffer.ByteBuf, ResourceLocation> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static String
assertValidNamespace
(String p_250769_, String p_249616_) private static String
assertValidPath
(String p_251418_, String p_248828_) static ResourceLocation
bySeparator
(String p_342228_, char p_344234_) int
Normal compare sorts by path first, this compares namespace first.int
compareTo
(ResourceLocation p_135826_) private static ResourceLocation
createUntrusted
(String p_344238_, String p_343734_) boolean
static ResourceLocation
fromNamespaceAndPath
(String p_344609_, String p_343842_) getPath()
int
hashCode()
static boolean
isAllowedInResourceLocation
(char p_135817_) static boolean
isValidNamespace
(String p_135844_) static boolean
isValidPath
(String p_135842_) static ResourceLocation
static ResourceLocation
read
(com.mojang.brigadier.StringReader p_135819_) static com.mojang.serialization.DataResult
<ResourceLocation> private static String
readGreedy
(com.mojang.brigadier.StringReader p_330450_) static ResourceLocation
readNonEmpty
(com.mojang.brigadier.StringReader p_330926_) toLanguageKey
(String p_214297_) toLanguageKey
(String p_270871_, String p_270199_) toString()
static ResourceLocation
static ResourceLocation
tryBySeparator
(String p_344079_, char p_344067_) static ResourceLocation
static boolean
validNamespaceChar
(char p_135836_) static boolean
validPathChar
(char p_135829_) static ResourceLocation
withDefaultNamespace
(String p_343785_) withPath
(UnaryOperator<String> p_250342_) withPrefix
(String p_250620_) withSuffix
(String p_266769_)
-
Field Details
-
CODEC
-
STREAM_CODEC
-
ERROR_INVALID
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INVALID -
NAMESPACE_SEPARATOR
public static final char NAMESPACE_SEPARATOR- See Also:
-
DEFAULT_NAMESPACE
- See Also:
-
REALMS_NAMESPACE
- See Also:
-
namespace
-
path
-
-
Constructor Details
-
ResourceLocation
-
-
Method Details
-
createUntrusted
-
fromNamespaceAndPath
-
parse
-
withDefaultNamespace
-
tryParse
-
tryBuild
-
bySeparator
-
tryBySeparator
-
read
-
getPath
-
getNamespace
-
withPath
-
withPath
-
withPrefix
-
withSuffix
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<ResourceLocation>
-
compareNamespaced
Normal compare sorts by path first, this compares namespace first. -
toDebugFileName
-
toLanguageKey
-
toShortLanguageKey
-
toLanguageKey
-
toLanguageKey
-
readGreedy
-
read
public static ResourceLocation read(com.mojang.brigadier.StringReader p_135819_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readNonEmpty
public static ResourceLocation readNonEmpty(com.mojang.brigadier.StringReader p_330926_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
isAllowedInResourceLocation
public static boolean isAllowedInResourceLocation(char p_135817_) -
isValidPath
-
isValidNamespace
-
assertValidNamespace
-
validPathChar
public static boolean validPathChar(char p_135829_) -
validNamespaceChar
public static boolean validNamespaceChar(char p_135836_) -
assertValidPath
-