import * as util from 'util'; import type { NBTObject } from '../arguments/nbt.js'; import { DataPointPickClass, type MacroArgument } from '../core/Macro.js'; import { ContainerCommandNode } from '../core/nodes.js'; import type { SandstonePack } from '../pack/index.js'; import type { DataPointClass } from './Data.js'; import { StringDataPointClass } from './Data.js'; import type { NBTAllArrays, NBTAllNumbers, NBTAllValues, NBTString } from './nbt/index.js'; import { NBTAnyValue, NBTClass } from './nbt/index.js'; import { Score } from './Score.js'; /** * Single AST node that wraps every command produced by `ResolveNBT`. * * While `_resolveNBT` runs we push this node onto the current MCFunction's * `contextStack` (via `enterContext(this, addNode=true)`), so the * `data modify` / `execute store` commands it emits commit into our body * instead of escaping into the caller's MCFunction body. After the resolve * we `exitContext()` and the node — already added to the parent context's * body — serializes as one block of lines when `getValue()` runs. * * Modelled on `ExecuteCommandNode` / `FlowClauseNode`: a `ContainerCommandNode` * whose `command` field reflects the first command in its body. */ export declare class ResolveNBTNode extends ContainerCommandNode { dataPoint: DataPointClass<'storage'>; /** * The NBT object the resolve was called with. Visitors that need to * correlate a `ResolveNBTNode` against an outer scope (e.g. matching * the resolved env vars against a `_.with(env, ...)`'s env list) read * this rather than descending into the command body. */ nbt: NBTObject; constructor(sandstonePack: SandstonePack, dataPoint: DataPointClass<'storage'>, nbt: NBTObject); /** * `command` is whatever the first command in the body serializes to. * Lets visitors / loggers inspect the leading command without walking * the body. */ get command(): string; getValue: () => string; [util.inspect.custom](_depth: number, _options: any): string; } export declare class ResolveNBTClass extends DataPointPickClass { private pack; dataPoint: NonNullable>; /** * Skip emitting the leading `data modify ... set value {}` / `set value []` * reset. Always true when ResolveNBT created its own internal dataPoint * (the temp storage is known empty). Callers passing an existing dataPoint * may opt in by passing `true` to suppress the reset. */ skipReset: boolean; constructor(pack: SandstonePack, nbt: any, dataPoint?: DataPointClass<'storage'>, skipReset?: boolean); } export declare class ResolveNBTPartClass extends NBTClass { value: Score[] | DataPointClass | MacroArgument | Score | StringDataPointClass; type: ValueType; primitive: Primitive; scale?: number; constructor(value: StringDataPointClass | MacroArgument | DataPointClass | Score | Score[], type: ValueType, primitive: Primitive, scale?: number); get mock(): InstanceType>; [util.inspect.custom]: () => string; } export declare function ResolveNBTPart(data: StringDataPointClass): ResolveNBTPartClass<'data', typeof NBTString>; export declare function ResolveNBTPart(data: MacroArgument): ResolveNBTPartClass<'data', NBTAllValues>; export declare function ResolveNBTPart(data: DataPointClass, type: NBTAllValues): ResolveNBTPartClass<'data', NBTAllValues>; export declare function ResolveNBTPart(score: Score, scale?: number, type?: T): ResolveNBTPartClass<'score', T>; export declare function ResolveNBTPart(scores: Score[], scale?: number, type?: T): ResolveNBTPartClass<'scores', T>; //# sourceMappingURL=ResolveNBT.d.ts.map