Class: AnvilParser
Defined in: packages/minerender/src/world/AnvilParser.ts:77
Reads numeric and paletted Java terrain and entity .mca regions without data-version migration.
Constructors
Constructor
new AnvilParser(): AnvilParser;Returns
AnvilParser
Methods
getChunkList()
static getChunkList(data): object[];Defined in: packages/minerender/src/world/AnvilParser.ts:80
Lists occupied chunk positions within the region, using local coordinates from 0 to 31.
Parameters
| Parameter | Type |
|---|---|
data | RegionInput |
Returns
object[]
parse()
static parse(data, options?): Promise<AnvilRegion>;Defined in: packages/minerender/src/world/AnvilParser.ts:85
Decodes all stored chunks. Gzip, zlib, LZ4, and uncompressed payloads are supported.
Parameters
| Parameter | Type |
|---|---|
data | RegionInput |
options | AnvilParseOptions |
Returns
Promise<AnvilRegion>
parseChunk()
static parseChunk(
data,
localX,
localZ,
options?
): Promise<AnvilChunk | undefined>;Defined in: packages/minerender/src/world/AnvilParser.ts:102
Decodes one chunk for MineRenderWorld.placeChunk.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | RegionInput | - |
localX | number | Chunk x within the region, from 0 to 31. |
localZ | number | Chunk z within the region, from 0 to 31. |
options | AnvilParseOptions | - |
Returns
Promise<AnvilChunk | undefined>
The chunk with absolute coordinates, or undefined if the region has no chunk there.
parseEntityChunk()
static parseEntityChunk(
data,
localX,
localZ,
options?
): Promise<AnvilEntityChunk | undefined>;Defined in: packages/minerender/src/world/AnvilParser.ts:117
Decodes one chunk from an entities/r.x.z.mca file without migrating its NBT.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | RegionInput | - |
localX | number | Chunk x within the region, from 0 to 31. |
localZ | number | Chunk z within the region, from 0 to 31. |
options | AnvilParseOptions | - |
Returns
Promise<AnvilEntityChunk | undefined>
The entities with absolute chunk coordinates, or undefined if no chunk is stored there.