// generated by diplomat-tool import type { NucleationError } from "./NucleationError.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Namespace for read-only queries over the built-in block table * (Java 26.2 blocks + official semantics extracted from the vanilla * jars: definition kinds, base-block links, block tags, model * geometry). All list results are JSON array strings sorted by id; * block/tag/kind arguments accept both `minecraft:`-prefixed and * short forms (`minecraft:oak_stairs` / `oak_stairs`). */ export class Blocks { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Full facts for one block as a JSON object: * `{id, kind, base_block, tags: [...], full_cube, transparent, * color: [r, g, b] | null, properties: {name: [values...]}, * default_state: {name: value}}`. `kind` is the official * definition kind (`minecraft:stair`, plain full blocks are * `minecraft:block`); `base_block` is the block this one is a * shape variant of (or `null`); `color` is the texture-derived * average RGB. Errors with `NotFound` for unknown ids. */ static getJson(id: string): string; /** * All known block ids as a sorted JSON array string. */ static idsJson(): string; /** * Ids of every block carrying the vanilla block tag, as a sorted * Blocks whose measured texture color is within `max_distance` * (Oklab; ~0.05 = same color family, ~0.15 = generous) of the given * RGB, as a JSON array of `{"id", "color": [r,g,b], "distance"}` * sorted nearest-first. Blocks without color data never match. */ static byColorJson(r: number, g: number, b: number, maxDistance: number): string; /** * JSON array string (`[]` for unknown tags). Accepts * `minecraft:wool` and short `wool` forms, including nested paths * like `mineable/pickaxe`. */ static byTagJson(tag: string): string; /** * Ids of every block of the given official definition kind * (`minecraft:stair`, `minecraft:slab`, `minecraft:door`, ...), as * a sorted JSON array string (`[]` for unknown kinds). */ static byKindJson(kind: string): string; /** * The base block followed by all its shape variants — blocks whose * `base_block` is `base_id` (stairs, slabs, walls, fences of the * base) — as a JSON array string. The base itself is always first; * variants follow sorted by id. Errors with `NotFound` for unknown * base ids. */ static variantsOfJson(baseId: string): string; /** * All known vanilla block tag names as a sorted JSON array string * (`minecraft:`-prefixed, e.g. `minecraft:wool`). */ static tagsJson(): string; /** * Every property-value combination of the block as a JSON array of * `{prop: value}` objects (a single `{}` entry for property-less * blocks). Errors with `NotFound` for unknown ids and with * `InvalidArgument` if the combination count exceeds 4096 (guard * against pathological output; the current data tops out at 1350 * for `minecraft:note_block`). */ static statesJson(id: string): string; /** * Total number of blocks in the table. */ static count(): number; }