@jsprismarine/prismarine
Version:
Dedicated Minecraft Bedrock Edition server written in TypeScript
41 lines • 1.18 kB
TypeScript
import { Generator, World } from '../';
import { Server } from '../../';
import { default as Chunk } from '../chunk/Chunk';
import { default as Provider } from './Provider';
export default abstract class BaseProvider implements Provider {
protected path: string;
protected server: Server;
protected world: World;
constructor(path: string, server: Server);
setWorld(world: World): void;
getWorld(): World;
/**
* On enable hook.
* @group Lifecycle
*/
enable(): Promise<void>;
/**
* On disable hook.
* @group Lifecycle
*/
disable(): Promise<void>;
getServer(): Server;
/**
* Returns the path to the world folder.
*/
getPath(): string;
/**
* Returns a chunk decoded from the provider.
*
* @param cx - the chunk x coordinate.
* @param cz - the chunk y coordinate.
*/
abstract readChunk(cx: number, cz: number, seed: number, generator: Generator, config?: any): Promise<Chunk>;
/**
* Writes a chunk.
*
* @param chunk - the chunk data.
*/
abstract writeChunk(chunk: Chunk): Promise<void>;
}
//# sourceMappingURL=BaseProvider.d.ts.map