mca-json 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
MCA
|
|
2
|
-
|
|
1
|
+
MCA JSON
|
|
2
|
+
========
|
|
3
3
|
|
|
4
4
|
Command-line tools to work with Minecraft Anvil files (`*.mca`), from version 1.21.4 or newer. Support could be added to earlier versions incrementally as needed.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is also a library to let you parse MCA files, NBT files, and SNBT strings in your own JavaScript programs. The library is written in TypeScript and has type definitions for all of the classes and methods.
|
|
7
|
+
|
|
8
|
+
To install, first you need to install Node.js, then use `npm` to install the package. Deno, Bun, pnpm, and other users can use this too - adjust the next command as you see fit.
|
|
7
9
|
|
|
8
10
|
```
|
|
9
|
-
npm install -g mca-
|
|
11
|
+
npm install -g mca-json
|
|
10
12
|
```
|
|
11
13
|
|
|
12
14
|
After that, you'll have access to all of these fine utilities.
|
|
@@ -81,7 +83,7 @@ nbt-json ~/.minecraft/saves/Test_World/playerdata/b248e729-09c2-40dd-9168-12d191
|
|
|
81
83
|
### `class Anvil`
|
|
82
84
|
|
|
83
85
|
```
|
|
84
|
-
import { Anvil } from 'mca-
|
|
86
|
+
import { Anvil } from 'mca-json';
|
|
85
87
|
import { readFile } from 'node:fs/promises';
|
|
86
88
|
|
|
87
89
|
const data = await readFile('r.0.0.mca');
|
|
@@ -98,6 +100,7 @@ Loads data into an Anvil class.
|
|
|
98
100
|
|
|
99
101
|
The `ArrayBuffer` used. Nothing gets parsed right away and is all loaded and parsed on demand.
|
|
100
102
|
|
|
103
|
+
|
|
101
104
|
#### `anvil.getAllChunks(): Chunk[]`
|
|
102
105
|
|
|
103
106
|
Parses the NBT data and returns an array of `Chunk` instances.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mca-json",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Convert Minecraft MCA (Anvil files) and NBT into JSON and back, or modify directly in memory. Works on region files and player data.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mca-chunks": "dist/bin/mca-chunks.js",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"main": "dist/index.mjs",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@types/node": "^25.2.3",
|
|
18
17
|
"debug": "^4.4.3",
|
|
19
18
|
"get-stdin": "^10.0.0",
|
|
20
19
|
"neodoc": "^2.0.2",
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
},
|
|
23
22
|
"devDependencies": {
|
|
24
23
|
"@types/debug": "^4.1.12",
|
|
24
|
+
"@types/node": "^25.2.3",
|
|
25
25
|
"@types/pako": "^2.0.4",
|
|
26
26
|
"typescript": "^5.9.3"
|
|
27
27
|
}
|