Class Identifier
java.lang.Object
net.minecraft.resources.Identifier
- All Implemented Interfaces:
Comparable<Identifier>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Codec<Identifier> static final Stringstatic final SimpleCommandExceptionTypeprivate final Stringstatic final charprivate final Stringstatic final Stringstatic final StreamCodec<io.netty.buffer.ByteBuf, Identifier> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringassertValidNamespace(String namespace, String path) private static StringassertValidPath(String namespace, String path) static IdentifierbySeparator(String identifier, char separator) intintprivate static IdentifiercreateUntrusted(String namespace, String path) booleanstatic IdentifierfromNamespaceAndPath(String namespace, String path) getPath()inthashCode()static booleanisAllowedInIdentifier(char c) static booleanisValidNamespace(String namespace) static booleanisValidPath(String path) static Identifierstatic Identifierread(StringReader reader) static DataResult<Identifier> private static StringreadGreedy(StringReader reader) static IdentifierreadNonEmpty(StringReader reader) resolveAgainst(Path root) toLanguageKey(String prefix) toLanguageKey(String prefix, String suffix) toString()static @Nullable Identifierstatic @Nullable IdentifiertryBySeparator(String identifier, char separator) static @Nullable Identifierstatic booleanvalidNamespaceChar(char c) static booleanvalidPathChar(char c) static IdentifierwithDefaultNamespace(String path) withPath(UnaryOperator<String> modifier) withPrefix(String prefix) withSuffix(String suffix)
-
Field Details
-
CODEC
-
STREAM_CODEC
-
ERROR_INVALID
-
NAMESPACE_SEPARATOR
public static final char NAMESPACE_SEPARATOR- See Also:
-
DEFAULT_NAMESPACE
- See Also:
-
REALMS_NAMESPACE
- See Also:
-
ALLOWED_NAMESPACE_CHARACTERS
- See Also:
-
namespace
-
path
-
-
Constructor Details
-
Identifier
-
-
Method Details
-
createUntrusted
-
fromNamespaceAndPath
-
parse
-
withDefaultNamespace
-
tryParse
-
tryBuild
-
bySeparator
-
tryBySeparator
-
read
-
getPath
-
getNamespace
-
withPath
-
withPath
-
withPrefix
-
withSuffix
-
toString
-
equals
-
hashCode
-
compareNamespaced
-
compareTo
- Specified by:
compareToin interfaceComparable<Identifier>
-
resolveAgainst
-
toDebugFileName
-
toLanguageKey
-
toShortLanguageKey
-
toShortString
-
toLanguageKey
-
toLanguageKey
-
readGreedy
-
read
- Throws:
CommandSyntaxException
-
readNonEmpty
- Throws:
CommandSyntaxException
-
isAllowedInIdentifier
public static boolean isAllowedInIdentifier(char c) -
isValidPath
-
isValidNamespace
-
assertValidNamespace
-
validPathChar
public static boolean validPathChar(char c) -
validNamespaceChar
public static boolean validNamespaceChar(char c) -
assertValidPath
-