JSPM

  • Created
  • Published
  • Downloads 166
  • Score
    100M100P100Q88324F
  • 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 npm Build Status

This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.

Save/World Data Loading

    import { World, LevelDataFrame } from '@xmcl/world'
    const levelDatBuffer: Buffer;
    const info: LevelDataFrame = await World.parseLevelData(levelDatBuffer);

Read the level info from a buffer.

    import { World } from "@xmcl/world";
    const worldSaveFolder: string;
    const { level, players } = await World.load(worldSaveFolder, ["level", "player"]);

Read the level data & player data by save folder location string.