UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

98 lines (97 loc) 4.83 kB
import CreatorTools, { CreatorToolsMinecraftErrorStatus, CreatorToolsMinecraftState } from "../app/CreatorTools"; import IMinecraft, { IMinecraftMessage, PrepareAndStartResultType } from "../app/IMinecraft"; import IStorage from "../storage/IStorage"; import IFolder from "../storage/IFolder"; import Project from "../app/Project"; import MinecraftPush from "../app/MinecraftPush"; import GameStateManager from "../minecraft/GameStateManager"; import IActionSetData from "../actions/IActionSetData"; import { IDebugStatsNotificationBody, IDebugConnectedNotificationBody, IDebugDisconnectedNotificationBody, IDebugPausedNotificationBody, IDebugResumedNotificationBody, IDebugProfilerStateNotificationBody, IProfilerCaptureNotificationBody } from "../local/IServerNotification"; export default class ProcessHostedMinecraft implements IMinecraft { private _creatorTools; private _project; private _gameStateManager; errorStatus?: CreatorToolsMinecraftErrorStatus; errorMessage?: string; state: CreatorToolsMinecraftState; dedicatedServerStorage: IStorage | null; private _dsDeployBehaviorPacksFolder; worldFolder: IFolder | undefined; projectFolder: IFolder | undefined; worldContentStorage: IStorage | undefined; worldProject: Project | undefined; private _onWorldStorageReady; private _onProjectStorageReady; private _onMessage; private _onStateChanged; private _onRefreshed; private _onDebugConnected; private _onDebugDisconnected; private _onDebugStats; private _onDebugPaused; private _onDebugResumed; private _onDebugProfilerState; private _onProfilerCapture; get onWorldFolderReady(): import("ste-events").IEvent<IMinecraft, IFolder>; get onProjectFolderReady(): import("ste-events").IEvent<IMinecraft, IFolder>; get onDebugConnected(): import("ste-events").IEvent<IMinecraft, IDebugConnectedNotificationBody>; get onDebugDisconnected(): import("ste-events").IEvent<IMinecraft, IDebugDisconnectedNotificationBody>; get onDebugStats(): import("ste-events").IEvent<IMinecraft, IDebugStatsNotificationBody>; get onDebugPaused(): import("ste-events").IEvent<IMinecraft, IDebugPausedNotificationBody>; get onDebugResumed(): import("ste-events").IEvent<IMinecraft, IDebugResumedNotificationBody>; get onDebugProfilerState(): import("ste-events").IEvent<IMinecraft, IDebugProfilerStateNotificationBody>; get onProfilerCapture(): import("ste-events").IEvent<IMinecraft, IProfilerCaptureNotificationBody>; get onMessage(): import("ste-events").IEvent<IMinecraft, IMinecraftMessage>; get gameStateManager(): GameStateManager; get onRefreshed(): import("ste-events").IEvent<IMinecraft, CreatorToolsMinecraftState>; get onStateChanged(): import("ste-events").IEvent<IMinecraft, CreatorToolsMinecraftState>; get activeProject(): Project | undefined; set activeProject(newProject: Project | undefined); get canDeployFiles(): boolean; constructor(creatorTools: CreatorTools); updateStatus(): Promise<CreatorToolsMinecraftState>; prepare(force?: boolean): Promise<void>; processExternalMessage(command: string, data: string): void; initialize(): Promise<void>; get dedicatedServerBehaviorPacksFolder(): IFolder | null; private notifyGameEvents; private _updateDedicatedServerStorage; /** * Send a debug pause command to the main process. */ debugPause(): Promise<void>; /** * Send a debug resume command to the main process. */ debugResume(): Promise<void>; /** * Send a debug start profiler command to the main process. */ debugStartProfiler(): Promise<void>; /** * Send a debug stop profiler command to the main process. */ debugStopProfiler(): Promise<void>; /** * When the dedicated server starts, query the main process for the world folder path * via IPC so that the world map and debug stats panels appear in MinecraftDisplay * immediately, without requiring a deploy operation first. */ private _initWorldFolderOnStart; notifyStateChanged(newVal: CreatorToolsMinecraftState): void; notifyRefreshed(newVal?: CreatorToolsMinecraftState): void; start(): Promise<void>; prepareDedicatedServer(project: Project): Promise<string>; restartDedicatedServer(project: Project): Promise<void>; canPrepare(): boolean; prepareAndStart(push: MinecraftPush): Promise<{ type: PrepareAndStartResultType; worldName: any; }>; syncWithDeployment(): Promise<void>; runCommand(command: string): Promise<string>; runActionSet(actionSet: IActionSetData): Promise<any>; deployDedicatedServerWorld(project: Project): Promise<string>; getDedicatedServerSyntax(): string; stop(): Promise<void>; }