import type { ExecuteCommand } from "../commands/index.js"; import type { DataPointExistsConditionNode, DataPointEqualsConditionNode } from "../flow/index.js"; import type { Coordinates, NBTObject, NBTSerializable, SingleEntityArgument, SingleEntityArgumentOf } from '../arguments/index.js'; import type { FinalCommandOutput } from '../commands/index.js'; import type { DataModifyTypeCommand, DataModifyValuesCommand, StoreType } from '../commands/implementations/index.js'; import type { SandstonePack } from '../pack/index.js'; import { DataPointPickClass, MacroArgument } from '../core/Macro.js'; import type { ConditionTextComponentClass } from './abstractClasses.js'; import { Score } from './Score.js'; export type DATA_TYPES = 'entity' | 'block' | 'storage'; export type DATA_TARGET = { entity: SingleEntityArgument; block: Coordinates; storage: string; }; export type DATA_PATH = string | MacroArgument | Record | NBTObject[]; export declare function NBTpathToString(pack: SandstonePack, paths: DATA_PATH[]): string; export type TargetFor = TYPE extends 'entity' ? SingleEntityArgumentOf : TYPE extends 'block' ? Coordinates : TYPE extends 'storage' ? string : never; export declare class TargetlessDataClass { protected sandstonePack: SandstonePack; type: TYPE; constructor(sandstonePack: SandstonePack, type: TYPE); target: (target: TargetFor) => DataClass; select: (...path: DATA_PATH[]) => TargetlessDataPointClass; } export declare class TargetlessDataPointClass { protected sandstonePack: SandstonePack; type: TYPE; path: string; constructor(sandstonePack: SandstonePack, type: TYPE, path: DATA_PATH[]); target: (target: TargetFor) => DataPointClass; select: (...path: DATA_PATH[]) => TargetlessDataPointClass; } export declare class DataClass { protected sandstonePack: SandstonePack; type: TYPE; currentTarget: DATA_TARGET[TYPE]; constructor(sandstonePack: SandstonePack, type: TYPE, target: DATA_TARGET[TYPE]); /** * Merge the given NBT to the current target. */ merge: (value: NBTObject) => void; target: (target: DATA_TARGET[TYPE]) => DataClass; select: (...path: DATA_PATH[]) => DataPointClass; toString: () => string; toJSON: () => string; } export declare class DataPointClass extends MacroArgument implements ConditionTextComponentClass, NBTSerializable { sandstonePack: SandstonePack; type: TYPE; readonly __textComponentClassBrand: true; readonly __conditionClassBrand: true; path: string; currentTarget: DATA_TARGET[TYPE]; constructor(sandstonePack: SandstonePack, type: TYPE, target: DATA_TARGET[TYPE], path: DATA_PATH[]); target: (target: DATA_TARGET[TYPE]) => DataPointClass; select: (...path: DATA_PATH[]) => DataPointClass; protected modify: (cb: (data: DataModifyTypeCommand) => DataModifyValuesCommand, value: NBTObject | DataPointClass | DataPointPickClass) => this; protected string: (cb: (data: DataModifyTypeCommand) => DataModifyValuesCommand, value: DataPointClass, start: number, end?: number) => void; protected executeStore: (storeType: StoreType, scale: number) => /* */ExecuteCommand; /** * Set the data point to the given NBT. */ set(value: NBTObject | DataPointClass): DataPointClass; /** * Set the data point to the given Data Point Pick. */ set(value: DataPointPickClass): DataPointClass; /** * Set the data point to the given score, with a given type and a scale. */ set(value: Score, storeType?: StoreType, scale?: number): DataPointClass; /** * Set the data point to the given NBT string. */ set(value: StringDataPointClass): DataPointClass; /** * Set the data point to the given NBT. */ merge: (value: NBTObject | DataPointClass | DataPointPickClass) => this; /** * Append the given NBT to the current data point. */ append: (value: NBTObject | DataPointClass | DataPointPickClass) => this; /** * Prepend the given NBT to the current data point. */ prepend: (value: NBTObject | DataPointClass | DataPointPickClass) => this; /** * Insert the given NBT to the given index of the current data point. */ insert: (value: NBTObject | DataPointClass | DataPointPickClass, index: number) => this; /** * Remove the current NBT value. */ remove: () => FinalCommandOutput; /** * Extracts a section of a string available for setting to another path, without modifying the original path. * * Use slice(0) to get a type-safe string data point; it compiles to a regular `from` argument. * * @param start Index of first character to include at the start of the string. * @param end Optional. Index of the first character to exclude at the end of the string. */ slice: (start: number, end?: number) => StringDataPointClass; _toMinecraftCondition: () => /* */DataPointExistsConditionNode; equals: (value: NBTObject | Score | DataPointClass | DataPointPickClass) => /* */DataPointEqualsConditionNode; } export declare class StringDataPointClass extends DataPointClass { sandstonePack: SandstonePack; type: TYPE; readonly __textComponentClassBrand: true; readonly __conditionClassBrand: true; readonly sliceBounds: [number] | [number, number]; constructor(sandstonePack: SandstonePack, type: TYPE, target: DATA_TARGET[TYPE], path: DATA_PATH, start: number, end?: number); } //# sourceMappingURL=Data.d.ts.map