Package Exports
- @xmcl/world
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@xmcl/world) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
World Module
This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.
Usage
Save/World Data Loading
Read the level info from a buffer.
import { WorldReader, LevelDataFrame } from '@xmcl/world'
const worldSaveFolder: string;
const reader: WorldReader = await WorldReader.create(worldSaveFolder);
const levelData: LevelDataFrame = await reader.getLevelData();Preview Read the region data, this feature is not tested yet, but the api will look like this
import { WorldReader, RegionDataFrame, RegionReader } from "@xmcl/world";
const worldSaveFolder: string;
const reader: WorldReader = await WorldReader.create(worldSaveFolder);
const chunkX: number;
const chunkZ: number;
const region: RegionDataFrame = await reader.getRegionData(chunkX, chunkZ);