PackResult

Represents the result of a pack building process.

This class holds the generated pack metadata, the output directory, and the collection of generated resources (assets and overlays). It also provides methods to calculate the pack hash and check for changes.

Since

1.15.2

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
@NotNull
@Unmodifiable
open fun assets(): @NotNull @Unmodifiable SortedSet<PackByte>
Returns the base assets of the pack.
Link copied to clipboard
open fun changed(): Boolean
Checks if the pack content has changed.
Link copied to clipboard
@Nullable
open fun directory(): @Nullable File
Returns the output directory of the pack.
Link copied to clipboard
open fun freeze()
Freezes the result, preventing further modifications.
open fun freeze(changed: Boolean)
Freezes the result and sets the changed status.
Link copied to clipboard
@NotNull
open fun hash(): @NotNull UUID
Calculates and returns the SHA-256 hash of the pack content as a UUID.
Link copied to clipboard
@NotNull
open fun meta(): @NotNull PackMeta
Returns the pack metadata.
Link copied to clipboard
@NotNull
@Unmodifiable
open fun overlays(@NotNull overlay: @NotNull PackOverlay): @NotNull @Unmodifiable SortedSet<PackByte>
Returns the resources for a specific overlay.
Link copied to clipboard
@ApiStatus.Internal
open fun set(@Nullable overlay: @Nullable PackOverlay, @NotNull packByte: @NotNull PackByte)
Adds a resource to the result.
Link copied to clipboard
open fun size(): Int
Returns the total number of resources in the pack.
Link copied to clipboard
@NotNull
open fun stream(): @NotNull Stream<PackByte>
Returns a stream of all resources in the pack.
Link copied to clipboard
open fun time(): Long
Returns the time elapsed since the result was created.