UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

32 lines (31 loc) 1.54 kB
import IFile from "../storage/IFile"; import { IEventHandler } from "ste-events"; import ILootTableBehavior from "./ILootTableBehavior"; import Project from "../app/Project"; import ProjectItem from "../app/ProjectItem"; import RelationsIndex from "../app/RelationsIndex"; export default class LootTableBehaviorDefinition { private _file?; private _isLoaded; private _loadedWithComments; data?: ILootTableBehavior; private _onLoaded; get isLoaded(): boolean; get file(): IFile | undefined; get onLoaded(): import("ste-events").IEvent<LootTableBehaviorDefinition, LootTableBehaviorDefinition>; set file(newFile: IFile | undefined); _ensureDataInitialized(): void; static ensureOnFile(file: IFile, loadHandler?: IEventHandler<LootTableBehaviorDefinition, LootTableBehaviorDefinition>): Promise<LootTableBehaviorDefinition>; getTargetItemTypeIdList(): string[]; getTargetLootTablePathList(): string[]; persist(): boolean; /** * Loads the definition from the file. * @param preserveComments If true, uses comment-preserving JSON parsing for edit/save cycles. * If false (default), uses efficient standard JSON parsing. * Can be called again with true to "upgrade" a read-only load to read/write. */ load(preserveComments?: boolean): Promise<void>; canonicalizeLootTablePath(lootTablePath: string): string; addChildItems(project: Project, item: ProjectItem, index?: RelationsIndex): Promise<void>; }