PackMeta

Represents the metadata (pack.mcmeta) of a resource pack.

This record handles the serialization and deserialization of the pack metadata, including pack format, description, and supported formats. It also supports overlays for multi-version support.

Since

1.15.2

Parameters

pack

the main pack configuration

overlays

the optional overlays configuration

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class Builder
Builder for PackMeta.
Link copied to clipboard
class Overlay : Record
Represents the 'overlays' section of the metadata.
Link copied to clipboard
Represents a single entry in the overlays list.
Link copied to clipboard
class Pack : Record
Represents the 'pack' section of the metadata.
Link copied to clipboard
Represents a pack version, consisting of major and minor numbers.
Link copied to clipboard
Represents a range of versions.

Properties

Link copied to clipboard
The standard path for the pack metadata file.

Functions

Link copied to clipboard
@NotNull
open fun builder(): @NotNull PackMeta.Builder
Creates a new builder for PackMeta.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
@NotNull
open fun toJson(): @NotNull JsonElement
Converts this metadata to a JSON element.
Link copied to clipboard
@NotNull
open fun toResource(): @NotNull PackResource
Converts this metadata to a pack resource.
Link copied to clipboard
abstract fun toString(): String