UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

65 lines (64 loc) 2.96 kB
import ActionSet from "./ActionSet"; import ActionGroup from "./ActionGroup"; import IAction from "./IAction"; import Location from "../minecraft/Location"; import BlockLocation from "../minecraft/BlockLocation"; import IScriptRequirements from "./IScriptRequirements"; import ICommandOptions from "./ICommandOptions"; import ICommandRequirements from "./ICommandRequirements"; import IGetSetPropertyObject from "../dataform/IGetSetPropertyObject"; import ActionSetScope from "./ActionSetScope"; import { IActionable } from "./IActionable"; import IFormDefinition from "../dataform/IFormDefinition"; import { IScriptGenerationOptions } from "../script/ActionSetScriptGenerator"; import IScriptGenerationContext, { ScriptGenerationPlacement } from "./IScriptGenerationContext"; export declare enum ActionType { simulatedPlayerSpawn = "test_simulated_player_spawn", simulatedPlayerMove = "test_simulated_player_move", simulatedPlayerInteract = "test_simulated_player_interact", entitySpawn = "entity_spawn", idle = "test_idle" } export default abstract class Action implements IGetSetPropertyObject, IActionable { data: IAction; group: ActionGroup; typeForm?: IFormDefinition; actionSet: ActionSet; get id(): string | undefined; set id(newId: string | undefined); private _onPropertyChanged; get onPropertyChanged(): import("ste-events").IEvent<Action, string>; get typeId(): string; get shortSubjectId(): string; get withId(): string; get setId(): string; get type(): string; getDataCopy(): { [propName: string]: any; }; constructor(group: ActionGroup, data: IAction); abstract validate(): boolean; run(scope: ActionSetScope): void; getProperty(id: string): any; setProperty(id: string, value: any): void; getBaseValue(): any; setBaseValue(value: any): void; getArgumentAsLocation(name: string): Location; getArgumentAsBlockLocation(name: string): BlockLocation; _notifyPropertyChanged(propertyName: string): void; abstract getScriptRequirements(options: IScriptGenerationOptions): IScriptRequirements; abstract getCommandRequirements(options: ICommandOptions): ICommandRequirements; abstract addScriptLines(lines: string[], options: IScriptGenerationOptions, context: IScriptGenerationContext, placement: ScriptGenerationPlacement): void; abstract addCommandLines(lines: string[], indent: number, options: ICommandOptions): void; getScriptTest(): string; getScriptWith(): string; getScriptSet(): string; getCommandWith(): string; getCommandSet(): string; getArgumentAsNumber(name: string): number; getArgumentAsString(name: string): any; validateArgumentIsEntityType(name: string): boolean; absolutizeLocation(location: Location): Location; absolutizeBlockLocation(location: BlockLocation): BlockLocation; validateArgumentIsType(name: string, type: string): boolean; }