minecraft-data 3.9.0 → 3.10.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.
Files changed (54) hide show
  1. package/.github/workflows/ci.yml +1 -6
  2. package/.github/workflows/md-release.yml +5 -4
  3. package/.github/workflows/npm-publish.yml +1 -2
  4. package/.github/workflows/trigger.yml +2 -2
  5. package/README.md +14 -15
  6. package/data.js +22 -1
  7. package/doc/api.md +460 -167
  8. package/doc/history.md +410 -176
  9. package/index.d.ts +152 -125
  10. package/lib/indexes.js +0 -2
  11. package/lib/loader.js +1 -2
  12. package/minecraft-data/README.md +1 -1
  13. package/minecraft-data/data/bedrock/1.16.201/proto.yml +1 -1
  14. package/minecraft-data/data/bedrock/1.16.201/protocol.json +1 -1
  15. package/minecraft-data/data/bedrock/1.16.210/proto.yml +1 -1
  16. package/minecraft-data/data/bedrock/1.16.210/protocol.json +1 -1
  17. package/minecraft-data/data/bedrock/1.16.220/proto.yml +1 -1
  18. package/minecraft-data/data/bedrock/1.16.220/protocol.json +1 -1
  19. package/minecraft-data/data/bedrock/1.17.0/proto.yml +1 -1
  20. package/minecraft-data/data/bedrock/1.17.0/protocol.json +1 -1
  21. package/minecraft-data/data/bedrock/1.17.10/proto.yml +1 -1
  22. package/minecraft-data/data/bedrock/1.17.10/protocol.json +1 -1
  23. package/minecraft-data/data/bedrock/1.17.30/proto.yml +1 -1
  24. package/minecraft-data/data/bedrock/1.17.30/protocol.json +1 -1
  25. package/minecraft-data/data/bedrock/1.17.40/proto.yml +1 -1
  26. package/minecraft-data/data/bedrock/1.17.40/protocol.json +1 -1
  27. package/minecraft-data/data/bedrock/1.18.0/proto.yml +1 -1
  28. package/minecraft-data/data/bedrock/1.18.0/protocol.json +1 -1
  29. package/minecraft-data/data/bedrock/1.18.11/proto.yml +1 -1
  30. package/minecraft-data/data/bedrock/1.18.11/protocol.json +1 -1
  31. package/minecraft-data/data/bedrock/1.18.30/proto.yml +1 -1
  32. package/minecraft-data/data/bedrock/1.18.30/protocol.json +1 -1
  33. package/minecraft-data/data/bedrock/1.19.1/proto.yml +1 -1
  34. package/minecraft-data/data/bedrock/1.19.1/protocol.json +1 -1
  35. package/minecraft-data/data/bedrock/1.19.10/proto.yml +3680 -0
  36. package/minecraft-data/data/bedrock/1.19.10/protocol.json +1 -1
  37. package/minecraft-data/data/bedrock/1.19.10/types.yml +1955 -0
  38. package/minecraft-data/data/bedrock/1.19.20/protocol.json +10644 -0
  39. package/minecraft-data/data/bedrock/1.19.20/version.json +6 -0
  40. package/minecraft-data/data/bedrock/common/protocolVersions.json +6 -0
  41. package/minecraft-data/data/bedrock/common/versions.json +2 -1
  42. package/minecraft-data/data/bedrock/latest/proto.yml +55 -7
  43. package/minecraft-data/data/bedrock/latest/types.yml +7 -0
  44. package/minecraft-data/data/dataPaths.json +22 -1
  45. package/minecraft-data/data/pc/1.19/protocol.json +1 -5
  46. package/minecraft-data/data/pc/1.7/protocol.json +1 -1
  47. package/minecraft-data/data/pc/1.8/protocol.json +1 -1
  48. package/minecraft-data/data/pc/15w40b/protocol.json +1 -1
  49. package/minecraft-data/data/pc/common/protocolVersions.json +35 -0
  50. package/minecraft-data/doc/history.md +14 -0
  51. package/package.json +1 -1
  52. package/typings/generate-typings.js +22 -14
  53. package/typings/index-template.d.ts +160 -133
  54. package/typings/test-typings.ts +24 -29
@@ -1,20 +1,15 @@
1
- name: CI
2
-
1
+ name: ci
3
2
  on:
4
3
  push:
5
4
  branches: [ master ]
6
5
  pull_request:
7
6
  branches: [ master ]
8
-
9
7
  jobs:
10
8
  build:
11
-
12
9
  runs-on: ubuntu-latest
13
-
14
10
  strategy:
15
11
  matrix:
16
12
  node-version: [14.x]
17
-
18
13
  steps:
19
14
  - uses: actions/checkout@v2
20
15
  with:
@@ -1,4 +1,4 @@
1
- name: Minecraft Data release
1
+ name: minecraft-data-release
2
2
  on:
3
3
  repository_dispatch:
4
4
  types: [mcData-release]
@@ -15,13 +15,14 @@ jobs:
15
15
  run: >
16
16
  sed -i -E 's/^ "version": "[0-9]+\.[0-9]+\.[0-9]+"/ "version": "${{ github.event.client_payload.tag }}"/g' package.json
17
17
  - name: Update doc/history.md
18
- run: echo -e "## ${{ github.event.client_payload.tag }}\n* update mcdata\n\n$(cat doc/history.md)" > doc/history.md
18
+ run: >
19
+ sed -i -E 's/^# History/# History\n\n## ${{ github.event.client_payload.tag }}\n\n* update \`minecraft-data\`/g' doc/history.md
19
20
  - name: Create commits
20
21
  run: |
21
22
  git config user.name 'rom1504bot'
22
23
  git config user.email 'rom1504bot@users.noreply.github.com'
23
24
  git add minecraft-data
24
- git commit -m "Update Minecraft Data"
25
+ git commit -m "Update `minecraft-data`"
25
26
  git add package.json doc/history.md
26
27
  git commit -m "Release ${{ github.event.client_payload.tag }}"
27
28
  - name: Create Pull Request
@@ -35,4 +36,4 @@ jobs:
35
36
  delete-branch: true
36
37
  title: 'Release ${{ github.event.client_payload.tag }}'
37
38
  body: |
38
- A new version of minecraft-data was released.
39
+ A new version of `minecraft-data` (`${{ github.event.client_payload.tag }}`) was released.
@@ -2,9 +2,8 @@ name: npm-publish
2
2
  on:
3
3
  push:
4
4
  branches:
5
- - master # Change this to your default branch
5
+ - master
6
6
  workflow_dispatch:
7
-
8
7
  jobs:
9
8
  npm-publish:
10
9
  name: npm-publish
@@ -1,9 +1,9 @@
1
- name: 'trigger'
1
+ name: trigger
2
2
  on:
3
3
  workflow_dispatch:
4
4
  inputs:
5
5
  tag:
6
- description: 'Tag of the release'
6
+ description: Tag of the release
7
7
  required: true
8
8
  default: '2.75.0'
9
9
  jobs:
package/README.md CHANGED
@@ -1,34 +1,33 @@
1
1
  # node-minecraft-data
2
+
2
3
  [![NPM version](https://badge.fury.io/js/minecraft-data.svg)](http://badge.fury.io/js/minecraft-data)
3
4
  [![Tonic](https://img.shields.io/badge/tonic-try%20it-blue.svg)](https://tonicdev.com/npm/minecraft-data)
4
5
  [![Build Status](https://github.com/PrismarineJS/node-minecraft-data/workflows/CI/badge.svg)](https://github.com/PrismarineJS/node-minecraft-data/actions?query=workflow%3A%22CI%22)
5
6
  [![Try it on gitpod](https://img.shields.io/badge/try-on%20gitpod-brightgreen.svg)](https://gitpod.io/#https://github.com/PrismarineJS/node-minecraft-data)
6
7
 
7
- node-minecraft-data provides easy access to [minecraft-data](https://github.com/PrismarineJS/minecraft-data) in node.js.
8
+ `node-minecraft-data` provides easy access to [minecraft-data](https://github.com/PrismarineJS/minecraft-data) in node.js.
8
9
 
9
- The objective of this module is to make easier to look for information in minecraft-data in node.
10
+ The objective of this module is to make easier to look for information in `minecraft-data` in node.
10
11
 
11
12
  ## Features
12
13
 
13
- For example it's often useful to :
14
-
15
- * find blocks by id
16
- * find items by name
17
- * find block or item by name
18
- * find block or item by id
14
+ This package allows the lookup of blocks, items, entities, etc. by name, id, etc., and for the easy lookup of other data.
19
15
 
20
16
  ## Example
21
17
 
22
18
  ```js
23
- const mcData=require("minecraft-data")("1.8.8")
19
+ const minecraftData = require('minecraft-data')
20
+ // or for es6: import minecraftData from 'minecraft-data';
21
+
22
+ const mcData = minecraftData('1.19')
24
23
 
25
- console.log(mcData.blocksByName["stone"])
26
- console.log(mcData.windows["minecraft:brewing_stand"])
27
- console.log(mcData.version)
28
- console.log(mcData.effectsByName["Haste"])
24
+ console.log(mcData.blocksByName['stone']) // Information for "Stone"
25
+ console.log(mcData.windows['minecraft:brewing_stand']) // Information for the "Brewing Stand" GUI
26
+ console.log(mcData.version) // Information about the current version
27
+ console.log(mcData.effectsByName['Haste']) // Information for the "Haste" effect
29
28
  ```
30
29
 
31
30
  ## Documentation
32
31
 
33
- * See [doc/api.md](doc/api.md)
34
- * See [doc/history.md](doc/history.md)
32
+ * See [doc/api.md](doc/api.md)
33
+ * See [doc/history.md](doc/history.md)
package/data.js CHANGED
@@ -1363,9 +1363,30 @@ module.exports =
1363
1363
  get steve () { return require("./minecraft-data/data/bedrock/1.16.201/steve.json") },
1364
1364
  get blocksB2J () { return require("./minecraft-data/data/bedrock/1.19.1/blocksB2J.json") },
1365
1365
  get blocksJ2B () { return require("./minecraft-data/data/bedrock/1.19.1/blocksJ2B.json") },
1366
+ proto: __dirname + '/minecraft-data/data/bedrock/1.19.10/proto.yml',
1367
+ types: __dirname + '/minecraft-data/data/bedrock/1.19.10/types.yml',
1368
+ get version () { return require("./minecraft-data/data/bedrock/1.19.10/version.json") }
1369
+ },
1370
+ '1.19.20': {
1371
+ get blocks () { return require("./minecraft-data/data/bedrock/1.19.1/blocks.json") },
1372
+ get blockStates () { return require("./minecraft-data/data/bedrock/1.19.1/blockStates.json") },
1373
+ get blockCollisionShapes () { return require("./minecraft-data/data/bedrock/1.19.1/blockCollisionShapes.json") },
1374
+ get biomes () { return require("./minecraft-data/data/bedrock/1.19.1/biomes.json") },
1375
+ get entities () { return require("./minecraft-data/data/bedrock/1.19.1/entities.json") },
1376
+ get items () { return require("./minecraft-data/data/bedrock/1.19.10/items.json") },
1377
+ get recipes () { return require("./minecraft-data/data/bedrock/1.19.10/recipes.json") },
1378
+ get instruments () { return require("./minecraft-data/data/bedrock/1.17.0/instruments.json") },
1379
+ get materials () { return require("./minecraft-data/data/pc/1.17/materials.json") },
1380
+ get enchantments () { return require("./minecraft-data/data/pc/1.17/enchantments.json") },
1381
+ get effects () { return require("./minecraft-data/data/pc/1.17/effects.json") },
1382
+ get protocol () { return require("./minecraft-data/data/bedrock/1.19.20/protocol.json") },
1383
+ get windows () { return require("./minecraft-data/data/bedrock/1.16.201/windows.json") },
1384
+ get steve () { return require("./minecraft-data/data/bedrock/1.16.201/steve.json") },
1385
+ get blocksB2J () { return require("./minecraft-data/data/bedrock/1.19.1/blocksB2J.json") },
1386
+ get blocksJ2B () { return require("./minecraft-data/data/bedrock/1.19.1/blocksJ2B.json") },
1366
1387
  proto: __dirname + '/minecraft-data/data/bedrock/latest/proto.yml',
1367
1388
  types: __dirname + '/minecraft-data/data/bedrock/latest/types.yml',
1368
- get version () { return require("./minecraft-data/data/bedrock/1.19.10/version.json") }
1389
+ get version () { return require("./minecraft-data/data/bedrock/1.19.20/version.json") }
1369
1390
  }
1370
1391
  }
1371
1392
  }