JSPM

  • Created
  • Published
  • Downloads 169
  • Score
    100M100P100Q88200F
  • License MIT

Minecraft world dat parsing

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

npm version Downloads Install size npm Build Status

Provides functions to parse Minecraft saves.

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);