Package Exports
- @xmcl/nbt
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/nbt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Nbt Module
This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.
NBT
import { NBT } from "@xmcl/nbt";
const fileData: Buffer;
const compressed: boolean;
const readed: NBT.Persistence.TypedObject = NBT.Persistence.deserialize(fileData, compressed);
const serial = NBT.Persistence.createSerializer()
.register("server", {
name: NBT.TagType.String,
host: NBT.TagType.String,
port: NBT.TagType.Int,
icon: NBT.TagType.String,
});
const serverInfo;
const serialized: Buffer = serial.serialize(serverInfo, "server");