minecraft-data 3.97.0 → 3.99.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/data.js +54 -5
- package/doc/history.md +8 -0
- package/index.d.ts +72 -63
- package/minecraft-data/.github/copilot-instructions.md +63 -0
- package/minecraft-data/.github/helper-bot/handleMcpcGeneratedArtifacts.js +113 -0
- package/minecraft-data/.github/helper-bot/index.js +46 -41
- package/minecraft-data/.github/helper-bot/package.json +11 -0
- package/minecraft-data/.github/helper-bot/utils.js +50 -0
- package/minecraft-data/.github/workflows/bedrock-ci.yml +3 -2
- package/minecraft-data/.github/workflows/handle-mcpc-generator.yml +39 -0
- package/minecraft-data/.github/workflows/update-helper.yml +4 -3
- package/minecraft-data/README.md +2 -2
- package/minecraft-data/data/bedrock/1.21.100/proto.yml +4573 -0
- package/minecraft-data/data/bedrock/1.21.100/protocol.json +2 -2
- package/minecraft-data/data/bedrock/1.21.100/types.yml +2841 -0
- package/minecraft-data/data/bedrock/1.21.111/proto.yml +4573 -0
- package/minecraft-data/data/bedrock/1.21.111/protocol.json +14380 -0
- package/minecraft-data/data/bedrock/1.21.111/types.yml +2841 -0
- package/minecraft-data/data/bedrock/1.21.111/version.json +6 -0
- package/minecraft-data/data/bedrock/common/protocolVersions.json +6 -0
- package/minecraft-data/data/bedrock/common/versions.json +2 -1
- package/minecraft-data/data/bedrock/latest/proto.yml +37 -30
- package/minecraft-data/data/bedrock/latest/types.yml +160 -154
- package/minecraft-data/data/dataPaths.json +55 -6
- package/minecraft-data/data/pc/1.21.6/proto.yml +3494 -0
- package/minecraft-data/data/pc/1.21.8/attributes.json +247 -0
- package/minecraft-data/data/pc/1.21.8/biomes.json +652 -0
- package/minecraft-data/data/pc/1.21.8/blockCollisionShapes.json +142541 -0
- package/minecraft-data/data/pc/1.21.8/blocks.json +41358 -0
- package/minecraft-data/data/pc/1.21.8/effects.json +236 -0
- package/minecraft-data/data/pc/1.21.8/enchantments.json +959 -0
- package/minecraft-data/data/pc/1.21.8/entities.json +4176 -0
- package/minecraft-data/data/pc/1.21.8/foods.json +402 -0
- package/minecraft-data/data/pc/1.21.8/instruments.json +94 -0
- package/minecraft-data/data/pc/1.21.8/items.json +9284 -0
- package/minecraft-data/data/pc/1.21.8/language.json +7394 -0
- package/minecraft-data/data/pc/1.21.8/materials.json +206 -0
- package/minecraft-data/data/pc/1.21.8/particles.json +458 -0
- package/minecraft-data/data/pc/1.21.8/protocol.json +10249 -0
- package/minecraft-data/data/pc/1.21.8/recipes.json +30473 -0
- package/minecraft-data/data/pc/1.21.8/sounds.json +6914 -0
- package/minecraft-data/data/pc/1.21.8/tints.json +465 -0
- package/minecraft-data/data/pc/1.21.8/version.json +6 -0
- package/minecraft-data/data/pc/common/protocolVersions.json +96 -0
- package/minecraft-data/data/pc/common/versions.json +6 -2
- package/minecraft-data/data/pc/latest/proto.yml +1 -1
- package/minecraft-data/doc/history.md +21 -0
- package/minecraft-data/schemas/blockMappings_schema.json +24 -34
- package/minecraft-data/schemas/commands_schema.json +13 -7
- package/minecraft-data/schemas/tints_schema.json +37 -128
- package/minecraft-data/tools/js/extractPcEntityMetadata.js +160 -102
- package/minecraft-data/tools/js/test/audit_versions.js +48 -0
- package/minecraft-data/tools/js/test/test.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const cp = require('child_process')
|
|
2
|
+
const github = require('gh-helpers')()
|
|
3
|
+
const path = require('path')
|
|
4
|
+
|
|
5
|
+
const pm = process.versions.bun ? process.execPath : 'npm'
|
|
6
|
+
|
|
7
|
+
function exec (file, args = [], options = {}) {
|
|
8
|
+
const opts = { stdio: ['inherit', 'inherit', 'inherit'], ...options }
|
|
9
|
+
console.log('> ', file, args.join(' '), options.cwd ? `(cwd: ${options.cwd})` : '')
|
|
10
|
+
return github.mock ? undefined : cp.execFileSync(file, args, opts)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const toolsJs = path.join(__dirname, '..', '..', 'tools', 'js')
|
|
14
|
+
const sanitizeBranch = (branchName) => branchName.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase()
|
|
15
|
+
|
|
16
|
+
async function createInitialPR (edition, issueUrl, { version, protocolVersion }) {
|
|
17
|
+
exec(pm, ['install'], { cwd: toolsJs })
|
|
18
|
+
if (protocolVersion) exec(pm, ['run', 'version', edition, version, protocolVersion], { cwd: toolsJs })
|
|
19
|
+
exec(pm, ['run', 'build'], { cwd: toolsJs })
|
|
20
|
+
const branchNameVersion = sanitizeBranch(version)
|
|
21
|
+
const branchName = `${edition}-${branchNameVersion}`
|
|
22
|
+
const title = `🎈 Add Minecraft ${edition} ${version} data`
|
|
23
|
+
// First, delete any existing branch
|
|
24
|
+
try {
|
|
25
|
+
exec('git', ['branch', '-D', branchName])
|
|
26
|
+
} catch (e) {
|
|
27
|
+
// Branch doesn't exist, ignore error
|
|
28
|
+
}
|
|
29
|
+
exec('git', ['checkout', '-b', branchName])
|
|
30
|
+
exec('git', ['config', 'user.name', 'github-actions[bot]'])
|
|
31
|
+
exec('git', ['config', 'user.email', '41898282+github-actions[bot]@users.noreply.github.com'])
|
|
32
|
+
exec('git', ['add', '--all'])
|
|
33
|
+
exec('git', ['commit', '--allow-empty', '-m', title])
|
|
34
|
+
exec('git', ['push', 'origin', branchName, '--force'])
|
|
35
|
+
const body = `
|
|
36
|
+
This automated PR sets up the relevant boilerplate for Minecraft ${edition} version ${version}. Fixes ${issueUrl}.
|
|
37
|
+
|
|
38
|
+
Related:
|
|
39
|
+
- Issue: ${issueUrl}
|
|
40
|
+
- Protocol Version: ${protocolVersion}
|
|
41
|
+
<!--minecraft-data-generator-placeholder-->
|
|
42
|
+
|
|
43
|
+
* You can help contribute to this PR by opening a PR against this <code branch>${branchName}</code> branch instead of <code>master</code>.
|
|
44
|
+
`
|
|
45
|
+
const pr = await github.createPullRequest(title, body, branchName, 'master')
|
|
46
|
+
pr.branchName = branchName
|
|
47
|
+
return pr
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = { createInitialPR, exec }
|
|
@@ -45,7 +45,6 @@ jobs:
|
|
|
45
45
|
with:
|
|
46
46
|
repository: PrismarineJS/bedrock-protocol
|
|
47
47
|
path: bedrock-protocol
|
|
48
|
-
- run: ls -R .
|
|
49
48
|
# I forget the correct install order, do both
|
|
50
49
|
- name: Install bedrock-protocol
|
|
51
50
|
run: |
|
|
@@ -54,5 +53,7 @@ jobs:
|
|
|
54
53
|
npm i
|
|
55
54
|
npm install ../node-mcdata
|
|
56
55
|
- name: Running bedrock-protocol tests
|
|
57
|
-
run:
|
|
56
|
+
run: |
|
|
57
|
+
curl -o node_modules/protodef/src/serializer.js https://raw.githubusercontent.com/extremeheat/node-protodef/refs/heads/dlog/src/serializer.js && curl -o node_modules/protodef/src/compiler.js https://raw.githubusercontent.com/extremeheat/node-protodef/refs/heads/dlog/src/compiler.js
|
|
58
|
+
npm test
|
|
58
59
|
working-directory: bedrock-protocol
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: handle-mcpc-generator
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
inputs:
|
|
5
|
+
versions:
|
|
6
|
+
description: 'JSON stringified list of known versions in generator (last is expected to be latest)'
|
|
7
|
+
required: true
|
|
8
|
+
default: '["1.21.6"]'
|
|
9
|
+
mergedArtifactURL:
|
|
10
|
+
description: 'Merged artifact download URL'
|
|
11
|
+
required: true
|
|
12
|
+
prNumber:
|
|
13
|
+
description: 'Relevant minecraft-data-generator PR #'
|
|
14
|
+
required: false
|
|
15
|
+
createPr:
|
|
16
|
+
description: 'Whether to create a new PR if none exists'
|
|
17
|
+
required: false
|
|
18
|
+
default: 'false'
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
update-mcdata:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
submodules: true
|
|
27
|
+
- uses: oven-sh/setup-bun@v2
|
|
28
|
+
with:
|
|
29
|
+
bun-version: latest
|
|
30
|
+
- run: cd .github/helper-bot && bun install
|
|
31
|
+
- run: cd tools/js && bun install
|
|
32
|
+
- run: bun handleMcpcGeneratedArtifacts.js
|
|
33
|
+
working-directory: .github/helper-bot
|
|
34
|
+
env:
|
|
35
|
+
TRIGGER_MC_VERSIONS: ${{ github.event.inputs.versions }}
|
|
36
|
+
TRIGGER_PR_NO: ${{ github.event.inputs.prNumber }}
|
|
37
|
+
TRIGGER_ARTIFACT_URL: ${{ github.event.inputs.mergedArtifactURL }}
|
|
38
|
+
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}
|
|
39
|
+
CREATE_PR_IF_NONE: ${{ github.event.inputs.createPr }}
|
|
@@ -16,10 +16,11 @@ jobs:
|
|
|
16
16
|
with:
|
|
17
17
|
node-version: 22.0.0
|
|
18
18
|
- name: Install Github Actions toolkit
|
|
19
|
-
run: npm i
|
|
19
|
+
run: npm i
|
|
20
20
|
working-directory: .github/helper-bot
|
|
21
21
|
# The env vars contain the relevant trigger information, so we don't need to pass it
|
|
22
22
|
- name: Runs helper
|
|
23
|
-
run:
|
|
23
|
+
run: node index.js
|
|
24
|
+
working-directory: .github/helper-bot
|
|
24
25
|
env:
|
|
25
|
-
GITHUB_TOKEN: ${{ secrets.
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}
|
package/minecraft-data/README.md
CHANGED
|
@@ -9,9 +9,9 @@ Language independent module providing minecraft data for minecraft clients, serv
|
|
|
9
9
|
|
|
10
10
|
Supports
|
|
11
11
|
* Minecraft PC version 0.30c (classic), 1.7.10, 1.8.8, 1.9 (15w40b, 1.9, 1.9.1-pre2, 1.9.2, 1.9.4),
|
|
12
|
-
1.10 (16w20a, 1.10-pre1, 1.10, 1.10.1, 1.10.2), 1.11 (16w35a, 1.11, 1.11.2), 1.12 (17w15a, 17w18b, 1.12-pre4, 1.12, 1.12.1, 1.12.2), 1.13 (17w50a, 1.13, 1.13.1, 1.13.2-pre1, 1.13.2-pre2, 1.13.2), 1.14 (1.14, 1.14.1, 1.14.3, 1.14.4), 1.15 (1.15, 1.15.1, 1.15.2), 1.16 (20w13b, 20w14a, 1.16-rc1, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5), 1.17, 1.17.1, 1.18 (1.18, 1.18.1, 1.18.2), 1.19 (1.19, 1.19.2, 1.19.3, 1.19.4), 1.20 (1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6), 1.21 (1.21, 1.21.1, 1.21.3)
|
|
12
|
+
1.10 (16w20a, 1.10-pre1, 1.10, 1.10.1, 1.10.2), 1.11 (16w35a, 1.11, 1.11.2), 1.12 (17w15a, 17w18b, 1.12-pre4, 1.12, 1.12.1, 1.12.2), 1.13 (17w50a, 1.13, 1.13.1, 1.13.2-pre1, 1.13.2-pre2, 1.13.2), 1.14 (1.14, 1.14.1, 1.14.3, 1.14.4), 1.15 (1.15, 1.15.1, 1.15.2), 1.16 (20w13b, 20w14a, 1.16-rc1, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5), 1.17, 1.17.1, 1.18 (1.18, 1.18.1, 1.18.2), 1.19 (1.19, 1.19.2, 1.19.3, 1.19.4), 1.20 (1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6), 1.21 (1.21, 1.21.1, 1.21.3), 1.21.8
|
|
13
13
|
<!--NEXT PC-->
|
|
14
|
-
* Minecraft bedrock version 0.14, 0.15, 1.0, 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20, 1.19.21, 1.19.30, 1.19.40, 1.19.50, 1.19.60, 1.19.62, 1.19.63, 1.19.70, 1.19.80, 1.20.0, 1.20.10, 1.20.30, 1.20.40, 1.20.50, 1.20.61, 1.20.71, 1.20.80, 1.21.0, 1.21.2, 1.21.20, 1.21.30, 1.21.42, 1.21.50, 1.21.60, 1.21.70, 1.21.80, 1.21.90, 1.21.93, 1.21.100
|
|
14
|
+
* Minecraft bedrock version 0.14, 0.15, 1.0, 1.16.201, 1.16.210, 1.16.220, 1.17.0, 1.17.10, 1.17.30, 1.17.40, 1.18.0, 1.18.11, 1.18.30, 1.19.1, 1.19.10, 1.19.20, 1.19.21, 1.19.30, 1.19.40, 1.19.50, 1.19.60, 1.19.62, 1.19.63, 1.19.70, 1.19.80, 1.20.0, 1.20.10, 1.20.30, 1.20.40, 1.20.50, 1.20.61, 1.20.71, 1.20.80, 1.21.0, 1.21.2, 1.21.20, 1.21.30, 1.21.42, 1.21.50, 1.21.60, 1.21.70, 1.21.80, 1.21.90, 1.21.93, 1.21.100, 1.21.111
|
|
15
15
|
<!--NEXT BEDROCK-->
|
|
16
16
|
|
|
17
17
|
## Wrappers
|