Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/helper-bot/handleMcpcGeneratedArtifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const { exec, createInitialPR } = require('./utils')
const artifactsDir = join(__dirname, './artifacts')
const root = join(__dirname, '..', '..')

async function handle (ourPR, genPullNo, version, artifactURL) {
async function handle (ourPR, genPullNo, version, artifactURL, shouldPull) {
const branchNameVersion = version.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase()
const branch = ourPR.headBranch || `pc-${branchNameVersion}`
exec('git', ['pull', 'origin'])
if (shouldPull) exec('git', ['pull', 'origin'])

// if external PR:
// const branch = ourPR.headBranch
Expand Down Expand Up @@ -90,7 +90,7 @@ async function main (versions, genPullNo, artifactUrl, createPR) {
if (pr && pr.isOpen) {
const details = await github.getPullRequest(pr.id)
console.log('PR', details)
await handle(details, genPullNo, version, artifactUrl)
await handle(details, genPullNo, version, artifactUrl, true)
} else if (createPR) {
const pr = await createInitialPR('pc', '(This issue was created for a minecraft-data-generator PR)', {
version,
Expand All @@ -99,7 +99,7 @@ async function main (versions, genPullNo, artifactUrl, createPR) {
console.log('Created PR', pr)
const details = await github.getPullRequest(pr.number)
console.log('PR', details)
await handle(details, genPullNo, version, artifactUrl)
await handle(details, genPullNo, version, artifactUrl, false)
} else {
process.exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion .github/helper-bot/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const sanitizeBranch = (branchName) => branchName.replace(/[^a-zA-Z0-9]/g, '_').

async function createInitialPR (edition, issueUrl, { version, protocolVersion }) {
exec(process.execPath, ['install'], { cwd: toolsJs })
exec(process.execPath, ['run', 'version', edition, version, protocolVersion], { cwd: toolsJs })
if (protocolVersion) exec(process.execPath, ['run', 'version', edition, version, protocolVersion], { cwd: toolsJs })
exec(process.execPath, ['run', 'build'], { cwd: toolsJs })
const branchNameVersion = sanitizeBranch(version)
const branchName = `${edition}-${branchNameVersion}`
Expand Down
3 changes: 2 additions & 1 deletion data/dataPaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,8 @@
"tints": "pc/1.21.8",
"version": "pc/1.21.8",
"windows": "pc/1.16.1",
"proto": "pc/latest"
"proto": "pc/latest",
"tags": "pc/1.21.8"
}
},
"bedrock": {
Expand Down
24 changes: 13 additions & 11 deletions data/pc/1.21.8/blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2879,9 +2879,7 @@
"num_values": 2
}
],
"drops": [
55
],
"drops": [],
"boundingBox": "block"
},
{
Expand Down Expand Up @@ -2925,7 +2923,9 @@
"num_values": 2
}
],
"drops": [],
"drops": [
56
],
"boundingBox": "block"
},
{
Expand Down Expand Up @@ -4361,7 +4361,7 @@
"maxStateId": 2050,
"states": [],
"drops": [
905
0
],
"boundingBox": "empty"
},
Expand Down Expand Up @@ -11231,7 +11231,7 @@
}
],
"drops": [
1063
0
],
"boundingBox": "empty"
},
Expand Down Expand Up @@ -30814,9 +30814,7 @@
"minStateId": 19692,
"maxStateId": 19692,
"states": [],
"drops": [
254
],
"drops": [],
"boundingBox": "empty"
},
{
Expand Down Expand Up @@ -30869,7 +30867,9 @@
]
}
],
"drops": [],
"drops": [
255
],
"boundingBox": "empty"
},
{
Expand All @@ -30888,7 +30888,9 @@
"minStateId": 19719,
"maxStateId": 19719,
"states": [],
"drops": [],
"drops": [
255
],
"boundingBox": "empty"
},
{
Expand Down
Loading