From 2d301892d5c7f525234b5f9514caebe23e5e8ba8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 13:42:21 +0000 Subject: [PATCH 1/4] Update to version 26.1.2 --- .github/workflows/ci.yml | 3 +++ docs/README.md | 2 +- src/version.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa9c970a..df994089 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,5 +55,8 @@ jobs: distribution: 'adopt' - name: Install dependencies run: npm install + - run: cd node_modules && cd minecraft-data && mv minecraft-data minecraft-data-old && git clone -b pc_26_1_2 https://github.com/PrismarineJS/minecraft-data --depth 1 && node bin/generate_data.js + - run: 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 + - name: Run tests run: npm run mochaTest -- -g ${{ matrix.mcVersion }}v diff --git a/docs/README.md b/docs/README.md index f1cddc60..c03c6ef9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,7 +18,7 @@ Parse and serialize minecraft packets, plus authentication and encryption. 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 (21w07a, 1.17, 1.17.1), 1.18 (1.18, 1.18.1 and 1.18.2), 1.19 (1.19, 1.19.1, 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, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.8, 1.21.9, 1.21.11 + 1.21, 1.21.1, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.8, 1.21.9, 1.21.11, 26.1.2 * Parses all packets and emits events with packet fields as JavaScript diff --git a/src/version.js b/src/version.js index 51312c21..385914b4 100644 --- a/src/version.js +++ b/src/version.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { - defaultVersion: '1.21.11', - supportedVersions: ['1.7', '1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20', '1.20.1', '1.20.2', '1.20.4', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.11'] + defaultVersion: '26.1.2', + supportedVersions: ['1.7', '1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20', '1.20.1', '1.20.2', '1.20.4', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.11', '26.1.2'] } From 4cdd81a5bba6af619c071a8dc58d0d1a3c2288ad Mon Sep 17 00:00:00 2001 From: Marc Neuhaus Date: Mon, 11 May 2026 22:13:38 +0200 Subject: [PATCH 2/4] Remove temporary 26.1.2 CI hacks --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df994089..fa9c970a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,5 @@ jobs: distribution: 'adopt' - name: Install dependencies run: npm install - - run: cd node_modules && cd minecraft-data && mv minecraft-data minecraft-data-old && git clone -b pc_26_1_2 https://github.com/PrismarineJS/minecraft-data --depth 1 && node bin/generate_data.js - - run: 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 - - name: Run tests run: npm run mochaTest -- -g ${{ matrix.mcVersion }}v From 067cd7c1bc9b7bdef54a8cfc0f5baf4db87e2300 Mon Sep 17 00:00:00 2001 From: Marc Neuhaus Date: Mon, 11 May 2026 22:36:51 +0200 Subject: [PATCH 3/4] Update 26.1.2 protocol tests --- test/packetTest.js | 8 +++++++- test/serverTest.js | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/packetTest.js b/test/packetTest.js index a5d7e918..db84ad02 100644 --- a/test/packetTest.js +++ b/test/packetTest.js @@ -73,7 +73,11 @@ function getFixedPacketPayload (version, packetName) { } } if (packetName === 'declare_recipes') { - if (version['>=']('1.21.3')) { + if (version['>=']('26.1.2')) { + return { + data: Buffer.alloc(0) + } + } else if (version['>=']('1.21.3')) { return { recipes: [ { @@ -554,6 +558,8 @@ for (const supportedVersion of mc.supportedVersions) { } function assertPacketsMatch (p1, p2) { + p1 = p1 || {} + p2 = p2 || {} packetInfo.forEach(function (field) { assert.deepEqual(p1[field], p2[field]) }) diff --git a/test/serverTest.js b/test/serverTest.js index b2e51540..b7885dd5 100644 --- a/test/serverTest.js +++ b/test/serverTest.js @@ -500,6 +500,10 @@ for (const supportedVersion of mc.supportedVersions) { }) it('supports bundle packet', function (done) { + const updateTimeFields = mcData.protocol.play.toClient.types.packet_update_time[1].map(field => field.name) + const updateTimePacket = updateTimeFields.includes('clockUpdates') + ? { gameTime: 1, clockUpdates: Buffer.alloc(0) } + : { age: 1, time: 2 } const server = mc.createServer({ 'online-mode': false, version: version.minecraftVersion, @@ -511,7 +515,7 @@ for (const supportedVersion of mc.supportedVersions) { }) client.write('login', loginPacket(client, server)) client.writeBundle([ - ['update_time', { age: 1, time: 2 }], + ['update_time', updateTimePacket], ['close_window', { windowId: 0 }] ]) }) From 3fb78a8da17cbce774a6cf8d78dfd889f1fbb8bf Mon Sep 17 00:00:00 2001 From: Marc Neuhaus Date: Tue, 12 May 2026 14:48:37 +0200 Subject: [PATCH 4/4] Use 26.1.2 data branch in CI --- .github/workflows/ci.yml | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa9c970a..735b52df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,10 +49,10 @@ jobs: with: node-version: 24.x - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 + uses: actions/setup-java@v4 with: - java-version: '21' - distribution: 'adopt' + distribution: 'temurin' + java-version: ${{ matrix.mcVersion == '26.1.2' && '26' || '21' }} - name: Install dependencies run: npm install - name: Run tests diff --git a/package.json b/package.json index 88e351ad..29f6a875 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "debug": "^4.3.2", "endian-toggle": "^0.0.0", "lodash.merge": "^4.3.0", - "minecraft-data": "^3.78.0", + "minecraft-data": "github:mneuhaus/node-minecraft-data#add-26.1.2-data-wrapper", "minecraft-folder-path": "^1.2.0", "node-fetch": "^2.6.1", "node-rsa": "^0.4.2",