mc-anvil
Version:
A Typescript library for reading Minecraft Anvil format files and Minecraft NBT format files in the browser.
50 lines (41 loc) • 873 B
text/typescript
import { TagData, TagType } from "../nbt";
export type LocationEntry = {
offset: number;
sectorCount: number;
};
export enum CompressionType {
GZIP = 1,
ZLIB = 2,
NONE = 3
}
export type ChunkDataDescriptor = {
length: number;
compressionType: CompressionType;
};
export type BlockStates = {
type: TagType.LONG_ARRAY;
name: "BlockStates";
data: ArrayBuffer;
};
export type Palette = {
type: TagType.LIST;
name: "Palette";
data: {
subType: TagType.COMPOUND;
data: TagData[][];
};
};
export type ChunkRootTag = {
type: TagType.COMPOUND;
name: "";
data: TagData[];
};
export type ChunkSectionTag = {
type: TagType.LIST;
name: "Sections";
data: {
subType: TagType.COMPOUND;
data: TagData[][];
};
};
export type Coordinate3D = [ number, number, number ];