of

@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.

Return

the created resource

Since

1.15.2

Parameters

path

the path of the resource

size

the estimated size

supplier

the content supplier


@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.

Return

the created resource

Since

1.15.2

Parameters

overlay

the overlay (or null for base pack)

path

the path of the resource

size

the estimated size

supplier

the content supplier