// generated by diplomat-tool import type { NucleationError } from "./NucleationError.mjs" import type { ResourcePackList } from "./ResourcePackList.mjs" import type { TextureInfo } from "./TextureInfo.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * A loaded (possibly merged) Minecraft resource pack. * Wraps {@link crate::meshing::ResourcePackSource}. */ export class ResourcePack { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Load a resource pack from an in-memory ZIP buffer. */ static fromBytes(data: Array): ResourcePack; /** * Load and merge multiple resource packs, lowest priority first. */ static fromList(list: ResourcePackList): ResourcePack; /** * Number of blockstate definitions in the pack. */ blockstateCount(): number; /** * Number of model definitions in the pack. */ modelCount(): number; /** * Number of textures in the pack. */ textureCount(): number; /** * Namespaces present in the pack, as a JSON array string. */ namespacesJson(): string; /** * All blockstate identifiers, as a JSON array string. */ listBlockstatesJson(): string; /** * All model identifiers, as a JSON array string. */ listModelsJson(): string; /** * All texture identifiers, as a JSON array string. */ listTexturesJson(): string; /** * The blockstate definition JSON for `name`; `NotFound` if absent. */ getBlockstateJson(name: string): string; /** * The model definition JSON for `name`; `NotFound` if absent. */ getModelJson(name: string): string; /** * Texture metadata (size, animation flag, frame count). */ getTextureInfo(name: string): TextureInfo; /** * Raw RGBA pixels of a texture, base64-encoded. */ getTexturePixelsB64(name: string): string; /** * Add (or override) a blockstate definition from a JSON string. */ addBlockstateJson(name: string, json: string): void; /** * Add (or override) a model definition from a JSON string. */ addModelJson(name: string, json: string): void; /** * Add a raw RGBA texture (`pixels` length must be `width * height * 4`). */ addTexture(name: string, width: number, height: number, pixels: Array): void; /** * Register a MeshExporter with the FormatManager so `save_as("mesh", ...)` * works. (Old ABI: `schematic_register_mesh_exporter`.) */ registerMeshExporter(): void; }