@bedrock-oss/add-on-registry 1.0.0 → 1.0.2
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/LICENSE +21 -21
- package/README.md +47 -47
- package/package.json +32 -32
- package/registry.js +16 -0
- package/types.d.ts +6 -6
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Bedrock OSS
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Bedrock OSS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# Add-On Registry
|
|
2
|
-
A registry for Minecraft Bedrock Add-Ons and their basic meta-data. This is intended to be used by features such as WAILA-Add-Ons to display accurate information about packs.
|
|
3
|
-
|
|
4
|
-
If you are an Add-On creator, you are welcome to add your pack to the registry so that it can be displayed accurately in other Add-Ons that display information about content from various Add-Ons.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Contribution
|
|
8
|
-
To add your project(s), create a new JSON file or edit one inside the `/registry` folder with the required details, and submit it via pull-request.
|
|
9
|
-
Your pull-request will automatically merge all JSON files together into
|
|
10
|
-
|
|
11
|
-
### Steps
|
|
12
|
-
1. Create a new JSON file or edit one inside the `/registry` folder.
|
|
13
|
-
- If you're a "new" creator, the filename should be your creator/studio name (e.g. `ascent.json`, `spark.json`).
|
|
14
|
-
2. Follow the structure used in the other files. Example:
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"ascent_paint": {
|
|
18
|
-
"name": "Paint",
|
|
19
|
-
"creator": "ASCENT"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
3. Commit your JSON file, then open a pull request.
|
|
24
|
-
|
|
25
|
-
### Notes
|
|
26
|
-
- The **key** should be the ID/namespace of your Add-On (the same namespace you use for blocks, entities, etc.).
|
|
27
|
-
- `name`: Display name of your Add-On.
|
|
28
|
-
- `creator`: Name of the creator or studio.
|
|
29
|
-
- Duplicate keys are not allowed. The build will fail if a namespace is already taken.
|
|
30
|
-
- Please use 4 spaces for indentation in your JSON file for consistency across all creator files.
|
|
31
|
-
|
|
32
|
-
## Including it in your pack
|
|
33
|
-
To use the registry in your project, install it via NPM from this repository:
|
|
34
|
-
```
|
|
35
|
-
npm i
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
You can now use it in your project like this:
|
|
39
|
-
```javascript
|
|
40
|
-
import { Registry } from "bedrock-add-on-registry"
|
|
41
|
-
|
|
42
|
-
function getAddOnName(identifier) {
|
|
43
|
-
const namespace = identifier.split(":")[0];
|
|
44
|
-
const entry = Registry[namespace];
|
|
45
|
-
// Use the namespace itself as fallback
|
|
46
|
-
return entry ? entry.name : namespace;
|
|
47
|
-
}
|
|
1
|
+
# Add-On Registry [](https://www.npmjs.com/package/@bedrock-oss/add-on-registry)
|
|
2
|
+
A registry for Minecraft Bedrock Add-Ons and their basic meta-data. This is intended to be used by features such as WAILA-Add-Ons to display accurate information about packs.
|
|
3
|
+
|
|
4
|
+
If you are an Add-On creator, you are welcome to add your pack to the registry so that it can be displayed accurately in other Add-Ons that display information about content from various Add-Ons.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Contribution
|
|
8
|
+
To add your project(s), create a new JSON file or edit one inside the `/registry` folder with the required details, and submit it via pull-request.
|
|
9
|
+
Your pull-request will automatically merge all JSON files together into one file `registry.js` that is not tracked by Git but published to NPM.
|
|
10
|
+
|
|
11
|
+
### Steps
|
|
12
|
+
1. Create a new JSON file or edit one inside the `/registry` folder.
|
|
13
|
+
- If you're a "new" creator, the filename should be your creator/studio name (e.g. `ascent.json`, `spark.json`).
|
|
14
|
+
2. Follow the structure used in the other files. Example:
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"ascent_paint": {
|
|
18
|
+
"name": "Paint",
|
|
19
|
+
"creator": "ASCENT"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
3. Commit your JSON file, then open a pull request.
|
|
24
|
+
|
|
25
|
+
### Notes
|
|
26
|
+
- The **key** should be the ID/namespace of your Add-On (the same namespace you use for blocks, entities, etc.).
|
|
27
|
+
- `name`: Display name of your Add-On.
|
|
28
|
+
- `creator`: Name of the creator or studio.
|
|
29
|
+
- Duplicate keys are not allowed. The build will fail if a namespace is already taken.
|
|
30
|
+
- Please use 4 spaces for indentation in your JSON file for consistency across all creator files.
|
|
31
|
+
|
|
32
|
+
## Including it in your pack
|
|
33
|
+
To use the registry in your project, install it via NPM from this repository:
|
|
34
|
+
```
|
|
35
|
+
npm i @bedrock-oss/add-on-registry
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
You can now use it in your project like this:
|
|
39
|
+
```javascript
|
|
40
|
+
import { Registry } from "@bedrock-oss/add-on-registry"
|
|
41
|
+
|
|
42
|
+
function getAddOnName(identifier) {
|
|
43
|
+
const namespace = identifier.split(":")[0];
|
|
44
|
+
const entry = Registry[namespace];
|
|
45
|
+
// Use the namespace itself as fallback
|
|
46
|
+
return entry ? entry.name : namespace;
|
|
47
|
+
}
|
|
48
48
|
```
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bedrock-oss/add-on-registry",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A registry for Minecraft Bedrock Add-Ons and their basic meta-data. This is intended to be used by features such as WAILA-add-ons to display accurate information about packs.",
|
|
5
|
-
"main": "registry.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"types": "types.d.ts",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/Bedrock-OSS/add-on-registry.git"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"Minecraft"
|
|
14
|
-
],
|
|
15
|
-
"author": "Bedrock-OSS",
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/Bedrock-OSS/add-on-registry/issues"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://github.com/Bedrock-OSS/add-on-registry#readme",
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "node scripts/build-registry.js",
|
|
23
|
-
"prepublishOnly": "npm run build"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"registry.js",
|
|
27
|
-
"types.d.ts"
|
|
28
|
-
],
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bedrock-oss/add-on-registry",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "A registry for Minecraft Bedrock Add-Ons and their basic meta-data. This is intended to be used by features such as WAILA-add-ons to display accurate information about packs.",
|
|
5
|
+
"main": "registry.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"types": "types.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Bedrock-OSS/add-on-registry.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"Minecraft"
|
|
14
|
+
],
|
|
15
|
+
"author": "Bedrock-OSS",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/Bedrock-OSS/add-on-registry/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/Bedrock-OSS/add-on-registry#readme",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "node scripts/build-registry.js",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"registry.js",
|
|
27
|
+
"types.d.ts"
|
|
28
|
+
],
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/registry.js
CHANGED
|
@@ -221,6 +221,22 @@ export const Registry = {
|
|
|
221
221
|
name: "Auto Factory",
|
|
222
222
|
creator: "Team Metallurgy",
|
|
223
223
|
},
|
|
224
|
+
twf_jb: {
|
|
225
|
+
name: "Chomp",
|
|
226
|
+
creator: "The World Foundry",
|
|
227
|
+
},
|
|
228
|
+
twfae_cos: {
|
|
229
|
+
name: "Lamp Lights",
|
|
230
|
+
creator: "The World Foundry",
|
|
231
|
+
},
|
|
232
|
+
twf_bmt: {
|
|
233
|
+
name: "Bubble",
|
|
234
|
+
creator: "The World Foundry",
|
|
235
|
+
},
|
|
236
|
+
twf_calm: {
|
|
237
|
+
name: "C.A.L.M.",
|
|
238
|
+
creator: "The World Foundry",
|
|
239
|
+
},
|
|
224
240
|
tomhmagic_realight: {
|
|
225
241
|
name: "Realight Reimagined",
|
|
226
242
|
creator: "Tomhmagic Creations",
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
interface RegistryEntry {
|
|
2
|
-
name: string
|
|
3
|
-
creator: string
|
|
4
|
-
}
|
|
5
|
-
type RegistryMap = Record<string, RegistryEntry>
|
|
6
|
-
export const Registry: RegistryMap
|
|
1
|
+
interface RegistryEntry {
|
|
2
|
+
name: string
|
|
3
|
+
creator: string
|
|
4
|
+
}
|
|
5
|
+
type RegistryMap = Record<string, RegistryEntry>
|
|
6
|
+
export const Registry: RegistryMap
|