diff --git a/mappings/net/minecraft/resources/Identifier.mapping b/mappings/net/minecraft/resources/Identifier.mapping new file mode 100644 index 0000000..a8e3005 --- /dev/null +++ b/mappings/net/minecraft/resources/Identifier.mapping @@ -0,0 +1,40 @@ +CLASS net/minecraft/resources/Identifier + COMMENT `Identifier`s are used in Minecraft's code to identify a resource's location. + COMMENT To avoid ambiguity, they consist of a namespace representing the creator of the resource and the path to the resource. + COMMENT When converted to a string, the namespace and path are combined becoming `namespace:path`. + METHOD assertValidPath (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + COMMENT @throws IdentifierException if the path contains a non `[a-z0-9/._-]` character. + METHOD fromNamespaceAndPath (Ljava/lang/String;Ljava/lang/String;)Lnet/minecraft/resources/Identifier; + COMMENT Creates an identifier from a namespace and a path. + COMMENT @param namespace the namespace, restricted to `[a-z0-9_.-]`. + COMMENT @param path the path, restricted to `[a-z0-9/._-]` + COMMENT @return an `Identifier` created from the namespace and path. + COMMENT @throws IdentifierException if either string contains an invalid character. + METHOD toLanguageKey ()Ljava/lang/String; + COMMENT @return A translation key in the format `namespace.path`. + METHOD toLanguageKey (Ljava/lang/String;)Ljava/lang/String; + COMMENT @return A translation key in the format `prefix.namespace.path`. + METHOD toLanguageKey (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + COMMENT @return A translation key in the format `prefix.namespace.path.suffix`. + METHOD toShortLanguageKey ()Ljava/lang/String; + COMMENT @return A translation key in the format `namespace.path`. If the namespace is `minecraft`, the translation key is shortened to `path`. + METHOD tryBuild (Ljava/lang/String;Ljava/lang/String;)Lnet/minecraft/resources/Identifier; + COMMENT Creates an `Identifier` from a namespace and a path. + COMMENT @param namespace the namespace, restricted to `[a-z0-9_.-]`. + COMMENT @param path the path, restricted to `[a-z0-9/._-]` + COMMENT @return an `Identifier` created from the namespace and path, or `null` if either string contains an invalid character. + METHOD withDefaultNamespace (Ljava/lang/String;)Lnet/minecraft/resources/Identifier; + COMMENT Creates an `Identifier` with the namespace set to [DEFAULT_NAMESPACE]. + COMMENT @param path the path, restricted to `[a-z0-9/._-]` + METHOD withPath (Ljava/lang/String;)Lnet/minecraft/resources/Identifier; + COMMENT @param newPath the path, restricted to `[a-z0-9/._-]` + COMMENT @return a new `Identifier` with the same namespace and a different path. + METHOD withPath (Ljava/util/function/UnaryOperator;)Lnet/minecraft/resources/Identifier; + COMMENT @param modifier a modifier to prepend to the existing path, with the result restricted to `[a-z0-9/._-]` + COMMENT @return creates a new `Identifier` with the same namespace and a different path. + METHOD withPrefix (Ljava/lang/String;)Lnet/minecraft/resources/Identifier; + COMMENT @param prefix a string to prepend to the existing path, restricted to `[a-z0-9/._-]` + COMMENT @return a new `Identifier` with the same namespace and a different path. + METHOD withSuffix (Ljava/lang/String;)Lnet/minecraft/resources/Identifier; + COMMENT @param suffix a string to append to the existing path, restricted to `[a-z0-9/._-]` + COMMENT @return a new `Identifier` with the same namespace and a different path.