mcbe-leveldb 1.1.0 → 1.2.0
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/DBUtils.js +1 -1
- package/DBUtils.ts +4 -4
- package/LevelUtils.ts +1 -1
- package/package.json +3 -3
package/DBUtils.js
CHANGED
|
@@ -41,7 +41,7 @@ export function getKeysOfTypes(dbOrDBKeys, types) {
|
|
|
41
41
|
* if you have your own add-on that you would like this to be able to read the player's names from, {@link https://www.8crafter.com/main/contact | contact 8Crafter},
|
|
42
42
|
* or make a pull request.
|
|
43
43
|
*
|
|
44
|
-
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/leveldb-zlib | leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
44
|
+
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/@8crafter/leveldb-zlib | @8crafter/leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
45
45
|
* @param uuid The UUID of the play to get the name of.
|
|
46
46
|
* @returns The name of the player, or `null` if the player's name cannot be found or the world has no dynamic properties.
|
|
47
47
|
*
|
package/DBUtils.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LevelDB } from "leveldb-zlib";
|
|
1
|
+
import type { LevelDB } from "@8crafter/leveldb-zlib";
|
|
2
2
|
import { getContentTypeFromDBKey, type DBEntryContentType } from "./LevelUtils.ts";
|
|
3
3
|
import NBT from "prismarine-nbt";
|
|
4
4
|
import { JSONB } from "./utils/JSONB.ts";
|
|
@@ -9,7 +9,7 @@ import { JSONB } from "./utils/JSONB.ts";
|
|
|
9
9
|
* Gets the keys from the LevelDB with a specific content type.
|
|
10
10
|
*
|
|
11
11
|
* @template T The content type to look for.
|
|
12
|
-
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/leveldb-zlib | leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
12
|
+
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/@8crafter/leveldb-zlib | @8crafter/leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
13
13
|
* @param type The {@link DBEntryContentType | content type} to look for.
|
|
14
14
|
* @returns The keys from the LevelDB with the specified content type, the keys are in Buffer format, this is because some keys contain binary data like chunk indices.
|
|
15
15
|
*/
|
|
@@ -38,7 +38,7 @@ export function getKeysOfType<T extends DBEntryContentType>(dbOrDBKeys: LevelDB
|
|
|
38
38
|
* Gets the keys from the LevelDB with one of the specified content types.
|
|
39
39
|
*
|
|
40
40
|
* @template T The content types to look for.
|
|
41
|
-
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/leveldb-zlib | leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
41
|
+
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/@8crafter/leveldb-zlib | @8crafter/leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
42
42
|
* @param types The {@link DBEntryContentType | content types} to look for.
|
|
43
43
|
* @returns An object mapping each of the specified content types to the keys from the LevelDB with that content type, the keys are in Buffer format, this is because some keys contain binary data like chunk indices.
|
|
44
44
|
*/
|
|
@@ -85,7 +85,7 @@ export function getKeysOfTypes<T extends DBEntryContentType[] | readonly DBEntry
|
|
|
85
85
|
* if you have your own add-on that you would like this to be able to read the player's names from, {@link https://www.8crafter.com/main/contact | contact 8Crafter},
|
|
86
86
|
* or make a pull request.
|
|
87
87
|
*
|
|
88
|
-
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/leveldb-zlib | leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
88
|
+
* @param db The LevelDB. Should match the type of the {@link LevelDB} class from the {@link https://www.npmjs.com/package/@8crafter/leveldb-zlib | @8crafter/leveldb-zlib} package. It does not have to be the one from that package, as long as the types match.
|
|
89
89
|
* @param uuid The UUID of the play to get the name of.
|
|
90
90
|
* @returns The name of the player, or `null` if the player's name cannot be found or the world has no dynamic properties.
|
|
91
91
|
*
|
package/LevelUtils.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendFileSync } from "node:fs";
|
|
2
2
|
import NBT from "prismarine-nbt";
|
|
3
3
|
import BiomeData from "./__biome_data__.ts";
|
|
4
|
-
import type { LevelDB } from "leveldb-zlib";
|
|
4
|
+
import type { LevelDB } from "@8crafter/leveldb-zlib";
|
|
5
5
|
import type { NBTSchemas } from "./nbtSchemas.ts";
|
|
6
6
|
|
|
7
7
|
//#region Local Constants
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcbe-leveldb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublishOnly": "tsc -p ./tsconfig.production.json",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"prismarine-nbt": "^2.7.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"leveldb-zlib": "^1.
|
|
34
|
+
"@8crafter/leveldb-zlib": "^1.3.0",
|
|
35
35
|
"@types/node": "^24.3.0"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"leveldb-zlib": "^1.
|
|
38
|
+
"@8crafter/leveldb-zlib": "^1.3.0"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|