@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
30 lines (29 loc) • 1.43 kB
TypeScript
import IFile from "../storage/IFile";
import { IEventHandler } from "ste-events";
import Project from "../app/Project";
import ProjectItem from "../app/ProjectItem";
import IDefinition from "./IDefinition";
export default class MusicDefinitionCatalogDefinition implements IDefinition {
private _data?;
private _file?;
private _isLoaded;
private _loadedWithComments;
private _onLoaded;
id: string | undefined;
get isLoaded(): boolean;
get file(): IFile | undefined;
get onLoaded(): import("ste-events").IEvent<MusicDefinitionCatalogDefinition, MusicDefinitionCatalogDefinition>;
set file(newFile: IFile | undefined);
get musicDefinitionNameList(): any[];
get musicDefinitionEventNameList(): string[];
static ensureOnFile(file: IFile, loadHandler?: IEventHandler<MusicDefinitionCatalogDefinition, MusicDefinitionCatalogDefinition>): Promise<MusicDefinitionCatalogDefinition>;
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>;
addChildItems(project: Project, item: ProjectItem): Promise<void>;
}