Class PackAssets

java.lang.Object
kr.toxicity.model.api.pack.PackAssets

public final class PackAssets extends Object
Manages assets within a specific pack overlay.

This class provides access to namespaces (like 'bettermodel' and 'minecraft') and allows adding resources to the pack.

Since:
1.15.2
  • Method Details

    • bettermodel

      @NotNull public @NotNull PackNamespace bettermodel()
      Returns the 'bettermodel' namespace (or the configured namespace).
      Returns:
      the namespace
      Since:
      1.15.2
    • minecraft

      @NotNull public @NotNull PackNamespace minecraft()
      Returns the 'minecraft' namespace.
      Returns:
      the namespace
      Since:
      1.15.2
    • add

      public void add(@NotNull @NotNull String path, long size, @NotNull @NotNull Supplier<byte[]> supplier)
      Adds a resource to the pack.
      Parameters:
      path - the path of the resource
      size - the estimated size of the resource
      supplier - the supplier for the resource content
      Since:
      1.15.2
    • add

      public void add(@NotNull @NotNull String[] paths, long size, @NotNull @NotNull Supplier<byte[]> supplier)
      Adds a resource to the pack using multiple path components.
      Parameters:
      paths - the path components
      size - the estimated size of the resource
      supplier - the supplier for the resource content
      Since:
      1.15.2
    • add

      public void add(@NotNull @NotNull String path, @NotNull @NotNull Supplier<byte[]> supplier)
      Adds a resource to the pack with unknown size.
      Parameters:
      path - the path of the resource
      supplier - the supplier for the resource content
      Since:
      1.15.2
    • add

      public void add(@NotNull @NotNull String[] paths, @NotNull @NotNull Supplier<byte[]> supplier)
      Adds a resource to the pack using multiple path components with unknown size.
      Parameters:
      paths - the path components
      supplier - the supplier for the resource content
      Since:
      1.15.2