UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

42 lines (41 loc) 1.53 kB
import IFile from "../storage/IFile"; import IDefinition from "./IDefinition"; import Project from "../app/Project"; import ProjectItem from "../app/ProjectItem"; export interface IJigsawStructureDefinition { format_version: string; "minecraft:jigsaw": { description: { identifier: string; }; step: string; terrain_adaptation: string; start_pool: string; max_depth: number; start_height: number; heightmap_projection: string; }; } export default class JigsawStructureDefinition implements IDefinition { private _file?; private _data?; private _isLoaded; private _loadedWithComments; get data(): IJigsawStructureDefinition; get file(): IFile | undefined; set file(newFile: IFile | undefined); get isLoaded(): boolean; get id(): string; get startPool(): string; getFormatVersionIsCurrent(): Promise<boolean>; addChildItems(project: Project, item: ProjectItem): Promise<void>; static ensureOnFile(file: IFile): Promise<JigsawStructureDefinition | undefined>; /** * 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>; persist(): boolean; }