public interface ResourcePackPart
The resource-pack part can contain one or multiple resource-pack elements that can be added to an existing resource-pack.
This interface allows developers to extract parts of the resource-pack in different objects
See the following example on making a "serializer" that converts custom blocks to something that can be written to a resource-pack.
interface CustomBlockSerializer{ T serialize(CustomBlock block); } class ResourcePackCustomBlockSerializer implements CustomBlockSerializer {
| Modifier and Type | Method and Description |
|---|---|
void |
addTo(@NotNull ResourceContainer resourceContainer)
Adds the resource-pack part to the given
resourceContainer. |
static @NotNull ResourcePackPart |
compound(@NotNull java.util.Collection<? extends ResourcePackPart> parts)
Creates a new resource-pack part that is compound
of the given
parts. |
static @NotNull ResourcePackPart |
compound(ResourcePackPart... parts)
Creates a new resource-pack part that is compound
of the given
parts. |
void addTo(@NotNull
@NotNull ResourceContainer resourceContainer)
resourceContainer.resourceContainer - The resource container@NotNull static @NotNull ResourcePackPart compound(@NotNull @NotNull java.util.Collection<? extends ResourcePackPart> parts)
parts.parts - The resource pack parts@NotNull static @NotNull ResourcePackPart compound(@NotNull ResourcePackPart... parts)
parts.parts - The resource pack parts