PackResource

Represents a resource within a resource pack.

A resource consists of its content (as a byte array), its path, and optionally the overlay it belongs to.

Since

1.15.2

Inheritors

Types

Link copied to clipboard
A simple implementation of PackResource.

Functions

Link copied to clipboard
abstract fun estimatedSize(): Long
Returns the estimated size of this resource in bytes.
Link copied to clipboard
abstract fun get(): T
Link copied to clipboard
@NotNull
open fun of(@NotNull path: @NotNull PackPath, size: Long, @NotNull supplier: @NotNull Supplier<Array<Byte>>): @NotNull PackResource
Creates a new pack resource for the base pack.
@NotNull
open fun of(@Nullable overlay: @Nullable PackOverlay, @NotNull path: @NotNull PackPath, size: Long, @NotNull supplier: @NotNull Supplier<Array<Byte>>): @NotNull PackResource
Creates a new pack resource for a specific overlay.
Link copied to clipboard
@Nullable
abstract fun overlay(): @Nullable PackOverlay
Returns the overlay this resource belongs to.
Link copied to clipboard
@NotNull
abstract fun path(): @NotNull PackPath
Returns the path of this resource.