// generated by diplomat-tool import type { NucleationError } from "./NucleationError.mjs" import type { Palette } from "./Palette.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Filter-driven palette construction (wraps * {@link crate::building::PaletteBuilder}, which fronts blockpedia's * `BlockFilter`). Call flag methods, then `build` — the builder is * consumed; further calls error with `AlreadyConsumed`. */ export class PaletteBuilder { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * A builder matching every colored block (no filters yet). */ static create(): PaletteBuilder; /** * Exclude gravity-affected blocks (sand, gravel, ...). */ excludeFalling(): void; /** * Exclude blocks with block entities (chests, furnaces, ...). */ excludeTileEntities(): void; /** * Keep only full cube blocks (no stairs, slabs, fences, ...). * Metadata-driven: uses the official model geometry extracted from * the vanilla jars, not block-name guessing. */ fullBlocksOnly(): void; /** * Exclude blocks that need supporting blocks (torches, rails, ...). */ excludeNeedsSupport(): void; /** * Exclude transparent/translucent blocks (glass, leaves, ...). * Metadata-driven: uses the per-block transparency flag from the * block-data pipeline, not block-name guessing. */ excludeTransparent(): void; /** * Exclude light-emitting blocks (glowstone, lanterns, ...). */ excludeLightSources(): void; /** * Keep only blocks obtainable in survival. */ survivalOnly(): void; /** * Exclude blocks whose id contains `keyword`. */ excludeKeyword(keyword: string): void; /** * Keep only blocks whose id contains `keyword` (repeatable; matches * any of the included keywords). */ includeKeyword(keyword: string): void; /** * Require the vanilla block tag `t` (`minecraft:wool` or short * `wool`, nested paths like `mineable/pickaxe` too). Repeatable — * a block must carry ALL required tags (AND semantics). */ tag(t: string): void; /** * Exclude blocks carrying the vanilla block tag `t` (any listed * tag disqualifies). Repeatable. */ excludeTag(t: string): void; /** * Keep only blocks of the official definition kind `k` * (`minecraft:stair` or short `stair`; plain full blocks are * `minecraft:block`). Repeatable — a block matching ANY listed * kind passes (OR semantics). */ kind(k: string): void; /** * Keep only blocks whose measured Oklab lightness L is within * `[min, max]` (0.0 = black, 1.0 = white). */ lightnessBetween(min: number, max: number): void; /** * Keep only near-neutral blocks: measured Oklab chroma at most * `max` (the grayscale preset uses 0.022). */ chromaBelow(max: number): void; /** * Keep only blocks whose measured color is within `max_distance` * (Oklab; ~0.05 = same family, ~0.15 = generous) of the RGB color. */ colorNear(r: number, g: number, b: number, maxDistance: number): void; /** * Build the palette; consumes the builder. */ build(): Palette; }