// generated by diplomat-tool import type { NucleationError } from "./NucleationError.mjs" import type { Schematic } from "./Schematic.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Fluent builder for schematics from character-mapped text layers. * * `build` is consuming (PORTING rule 11): the inner builder is held in an * `Option` and taken on `build`; every method afterwards returns * `AlreadyConsumed`. */ export class SchematicBuilder { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Create a new builder, pre-loaded with the standard Unicode palette * (override any character via `map` or `palette`). */ static create(): SchematicBuilder; /** * Parse a builder from the canonical template text format. */ static fromTemplate(template: string): SchematicBuilder; /** * Set the schematic name. */ name(name: string): void; /** * Map a palette character to a block string. `ch` must contain exactly * one character (its first char is used). */ map(ch: string, block: string): void; /** * Append layers. `layers_json` is a JSON array of arrays of row strings, * e.g. `[["ab","cd"],["ef","gh"]]`. */ layers(layersJson: string): void; /** * Append a single layer of rows. `rows_json` is a JSON array of strings, * e.g. `["abc", "def"]`. Equivalent to a one-element layers array. */ layer(rowsJson: string): void; /** * Bulk-register palette characters. `pairs_json` is a JSON array of * `[char, block]` two-element arrays, e.g. * `[["c", "minecraft:gray_concrete"], [" ", "minecraft:air"]]`. */ palette(pairsJson: string): void; /** * Set the build offset applied to every placed block. */ offset(x: number, y: number, z: number): void; /** * Register the standard Unicode palette (redstone wires, repeaters, * comparators, torches, blocks, air...; the same set `create` * pre-loads), overwriting any clashing character mappings. */ useStandardPalette(): void; /** * Register the minimal palette (an essentials-only subset of the * standard one), overwriting any clashing character mappings. */ useMinimalPalette(): void; /** * Register the compact ASCII-only palette, overwriting any clashing * character mappings. */ useCompactPalette(): void; /** * Run pre-build validation without consuming the builder. */ validate(): void; /** * Serialize the builder back into the canonical template format. */ toTemplate(): string; /** * Build the schematic. Consuming: the builder cannot be reused afterwards * (subsequent calls return `AlreadyConsumed`), including after a failed * build. */ build(): Schematic; }