Package kr.toxicity.model.api.pack
Class PackAssets
java.lang.Object
kr.toxicity.model.api.pack.PackAssets
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 Summary
Modifier and TypeMethodDescriptionvoidAdds a resource to the pack using multiple path components.voidAdds a resource to the pack using multiple path components with unknown size.voidAdds a resource to the pack.voidAdds a resource to the pack with unknown size.@NotNull PackNamespaceReturns the 'bettermodel' namespace (or the configured namespace).@NotNull PackNamespaceReturns the 'minecraft' namespace.
-
Method Details
-
bettermodel
Returns the 'bettermodel' namespace (or the configured namespace).- Returns:
- the namespace
- Since:
- 1.15.2
-
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 resourcesize- the estimated size of the resourcesupplier- 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 componentssize- the estimated size of the resourcesupplier- the supplier for the resource content- Since:
- 1.15.2
-
add
Adds a resource to the pack with unknown size.- Parameters:
path- the path of the resourcesupplier- the supplier for the resource content- Since:
- 1.15.2
-
add
Adds a resource to the pack using multiple path components with unknown size.- Parameters:
paths- the path componentssupplier- the supplier for the resource content- Since:
- 1.15.2
-