ResourceId

data class ResourceId(val namespace: String, val path: String)(source)

Immutable resource-pack identifier shared by client and server code.

The identifier owns only a validated namespace and resource-manager path. It contains no pixels, open resource, or platform object and is safe to retain across threads.

Throws

when either part is empty or contains unsupported characters.

Constructors

Link copied to clipboard
constructor(namespace: String, path: String)

Properties

Link copied to clipboard

lowercase namespace matching [a-z0-9_.-]+.

Link copied to clipboard

lowercase slash-separated path matching [a-z0-9/._-]+.

Functions

Link copied to clipboard
open override fun toString(): String

Returns the canonical namespace-qualified resource spelling.