PackBuilder
class PackBuilder
A builder for constructing resource pack contents within a specific path context.
This class simplifies adding resources to a pack by managing the current path and providing methods to resolve sub-paths. It also integrates with PackObfuscator for resource name obfuscation.
Since
1.15.2
Functions
Link copied to clipboard
Adds a resource to the pack at the current path with unknown size.
open fun add(@NotNull paths: Array<@NotNull String>, @NotNull supplier: @NotNull Supplier<Array<Byte>>)
Adds a resource to the pack at the current path using multiple path components with unknown size.
open fun add(@NotNull path: @NotNull String, estimatedSize: Long, @NotNull supplier: @NotNull Supplier<Array<Byte>>)
Adds a resource to the pack at the current path.
open fun add(@NotNull paths: Array<@NotNull String>, size: Long, @NotNull supplier: @NotNull Supplier<Array<Byte>>)
Adds a resource to the pack at the current path using multiple path components.
Link copied to clipboard
Returns the obfuscator associated with this builder.
Link copied to clipboard
Resolves a sub-path and returns a new builder for that path.