// generated by diplomat-tool import type { NucleationError } from "./NucleationError.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Namespace type for the free-standing NBT builder helpers (the old * `nbt_text_build` / `nbt_chest_build` / `nbt_sign_build`), following the * static-methods-on-a-dummy-opaque pattern. */ export class Nbt { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Build a Minecraft JSON text-component string. * * `color` may be empty (no color). `bold` and `italic` use `-1` for * unset, `0` for false, nonzero for true. */ static textBuild(s: string, color: string, bold: number, italic: number): string; /** * Build a chest-NBT SNBT string for use as the `{...}` portion of a block * string. * * `items_json` is a JSON array of `{"id": string, "count"?: int, * "slot"?: int}` entries (may be empty or `[]`); a missing/non-positive * `count` defaults to 1, a missing/negative `slot` auto-assigns * positionally. `name` is an optional plain-text custom name (empty = no * `CustomName`); it is wrapped in a JSON text component automatically * unless it already starts with `{`. */ static chestBuild(itemsJson: string, name: string): string; /** * Build a modern (1.20+) sign-NBT SNBT string. * * `front_json` and `back_json` are JSON arrays of up to 4 line strings * (either may be empty or `[]`). Each line may be a plain string * (auto-wrapped via `text_build`) or an already-built JSON component * (starts with `{`). `color` is the dye color string (empty defaults to * `"black"`). */ static signBuild(frontJson: string, backJson: string, color: string, glowing: boolean, waxed: boolean): string; }