UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

37 lines (36 loc) 1.75 kB
import IFile from "../storage/IFile"; import { IEventHandler } from "ste-events"; import IResourceAnimationWrapper, { IAnimationResource } from "./IAnimationResource"; import IDefinition from "./IDefinition"; export default class AnimationResourceDefinition implements IDefinition { private _file?; private _id?; private _isLoaded; private _loadedWithComments; private _data?; private _onLoaded; get data(): IResourceAnimationWrapper; get isLoaded(): boolean; get file(): IFile | undefined; get onLoaded(): import("ste-events").IEvent<AnimationResourceDefinition, AnimationResourceDefinition>; set file(newFile: IFile | undefined); get id(): string | undefined; set id(newId: string | undefined); get shortId(): string; get idList(): Set<string>; get animations(): import("./IAnimationResource").IAnimationResourceSet; getFormatVersionIsCurrent(): Promise<boolean>; getFormatVersion(): number[] | undefined; setResourcePackFormatVersion(versionStr: string): void; ensureDefault(): IResourceAnimationWrapper; ensureAnimation(animationName: string): IAnimationResource; static ensureOnFile(file: IFile, loadHandler?: IEventHandler<AnimationResourceDefinition, AnimationResourceDefinition>): Promise<AnimationResourceDefinition>; 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>; }