// generated by diplomat-tool import type { Dimensions } from "./Dimensions.mjs" import type { ItemModelConfig } from "./ItemModelConfig.mjs" import type { ItemModelPackBuilder } from "./ItemModelPackBuilder.mjs" import type { ItemScale } from "./ItemScale.mjs" import type { NucleationError } from "./NucleationError.mjs" import type { ResourcePack } from "./ResourcePack.mjs" import type { Schematic } from "./Schematic.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * A generated item model. Wraps {@link crate::meshing::ItemModelResult}. * * Holds `Option<...>` because {@link ItemModelResult::add_to_pack} moves the * inner value into an {@link ItemModelPackBuilder} (PORTING rule 11); accessors * return `AlreadyConsumed` afterwards. */ export class ItemModelResult { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Generate an item model from a schematic (old ABI: `schematic_to_item_model`). */ static create(schematic: Schematic, pack: ResourcePack, config: ItemModelConfig): ItemModelResult; /** * The Minecraft item model JSON. */ modelJson(): string; /** * Number of elements (cuboids) in the generated model. */ elementCount(): number; /** * Number of textures the generated model uses. */ textureCount(): number; /** * Number of textured planes in the generated model. */ planeCount(): number; /** * Source schematic dimensions in blocks. */ dimensions(): Dimensions; /** * The applied model scale (old ABI: `itemmodel_result_scale`). */ scale(): ItemScale; /** * A single-model resource pack ZIP, base64-encoded. */ toResourcePackZipB64(): string; /** * Move this result into a pack builder. Consumes the result: further * accessor calls return `AlreadyConsumed`. */ addToPack(builder: ItemModelPackBuilder): void; }