-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for Minecraft 1.21.9, 1.21.10, and 1.21.11 #3797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Minecraft 1.21.9, 1.21.10, and 1.21.11 #3797
Conversation
- Add 1.21.9, 1.21.10, and 1.21.11 to testedVersions in lib/version.js - Update minecraft-data to ^3.102.0 for 1.21.11 data support - Update minecraft-protocol to ^1.62.0 for protocol 774 support - Update docs/README.md to reflect support for 1.21.11 - Add timing delays to tests to prevent PartialReadErrors: - furnace.js: Add 2000ms initial delay - sign.js: Add 2000ms initial delay - digAndBuild.js: Add 2000ms initial delay - rain.js: Add 3000ms initial delay, increase weather wait to 2000ms - sound.js: Add 2000ms initial delay - useChests.js: Add 3000ms initial delay - creative.js: Add 2000ms initial delay - crafting.js: Add delays after updateSlot - nether.js: Add 2000ms initial delay and null checks - spawnEvent.js: Add 2000ms initial delay - testCommon.js: Increase clearInventory timeout to 30s - internalTest.js: Fix generateChunkPacket version parameter Co-authored-by: HenkjanvDiermen (original timing fixes for 1.21.9/1.21.10) Extends PR PrismarineJS#3796 to include 1.21.11 support
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for Minecraft versions 1.21.9, 1.21.10, and 1.21.11 by updating dependencies and addressing timing-related test failures caused by race conditions during entity spawns.
- Updated
minecraft-datato^3.102.0andminecraft-protocolto^1.62.0 - Added new Minecraft versions (1.21.9, 1.21.10, 1.21.11) to the tested versions list
- Fixed test timing issues by adding initial delays to prevent PartialReadErrors
- Updated biomes handling in chunk generation for 1.21.9+ compatibility
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated minecraft-data and minecraft-protocol dependencies to support new versions |
| lib/version.js | Added 1.21.9, 1.21.10, and 1.21.11 to testedVersions array |
| docs/README.md | Updated documentation to reflect support for 1.21.11 |
| test/internalTest.js | Modified generateChunkPacket to accept version parameter and skip biomes for 1.21.9+; relaxed position assertion tolerance |
| test/externalTests/useChests.js | Added 3000ms initial delay to prevent race conditions |
| test/externalTests/spawnEvent.js | Added 2000ms initial delay |
| test/externalTests/sound.js | Added 2000ms initial delay |
| test/externalTests/sign.js | Added 2000ms initial delay |
| test/externalTests/rain.js | Increased initial and weather wait delays |
| test/externalTests/plugins/testCommon.js | Added random delay before clearInventory and increased timeout to 30s |
| test/externalTests/nether.js | Added null checks for sign and signText |
| test/externalTests/furnace.js | Added 2000ms initial delay |
| test/externalTests/digAndBuild.js | Added 2000ms initial delay |
| test/externalTests/creative.js | Added 2000ms initial delay |
| test/externalTests/crafting.js | Added delays after updateSlot and window cleanup logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| const { Vec3 } = require('vec3') | |||
| const { Vec3 } = require('vec3') | |||
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file contains a Unicode BOM (Byte Order Mark) character at the start. This can cause issues with some tools and parsers. The BOM should be removed.
| const { Vec3 } = require('vec3') | |
| const { Vec3 } = require('vec3') |
| await sleep(Math.floor(Math.random() * 500) + 200) // Random delay 200-700ms | ||
|
|
||
| const giveStone = onceWithCleanup(bot.inventory, 'updateSlot', { | ||
| timeout: 1000 * 30, // Increased from 20s to 30s, checkCondition: (slot, oldItem, newItem) => newItem?.name === 'stone' }) |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timeout configuration comment is incorrectly formatted. The comment "Increased from 20s to 30s" appears inside the function call arguments instead of on a separate line. This breaks the syntax and will cause a parsing error.
| timeout: 1000 * 30, // Increased from 20s to 30s, checkCondition: (slot, oldItem, newItem) => newItem?.name === 'stone' }) | |
| timeout: 1000 * 30, // Increased from 20s to 30s | |
| checkCondition: (slot, oldItem, newItem) => newItem?.name === 'stone' | |
| }) |
| @@ -1,10 +1,8 @@ | |||
| const { once } = require('../../lib/promise_utils') | |||
| const { once } = require('../../lib/promise_utils') | |||
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file contains a Unicode BOM (Byte Order Mark) character at the start. This can cause issues with some tools and parsers. The BOM should be removed.
| const { once } = require('../../lib/promise_utils') | |
| const { once } = require('../../lib/promise_utils') |
| @@ -1,4 +1,4 @@ | |||
| const testedVersions = ['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', '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'] | |||
| const testedVersions = ['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', '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.10', '1.21.11'] | |||
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file contains a Unicode BOM (Byte Order Mark) character at the start. This can cause issues with some tools and parsers. The BOM should be removed.
| [](https://discord.gg/GsEFRM8) | ||
|
|
||
| | <sub>EN</sub> [English](README.md) | <sub>RU</sub> [русский](ru/README_RU.md) | <sub>ES</sub> [Español](es/README_ES.md) | <sub>FR</sub> [Français](fr/README_FR.md) | <sub>TR</sub> [Türkçe](tr/README_TR.md) | <sub>ZH</sub> [中文](zh/README_ZH_CN.md) | <sub>BR</sub> [Português](br/README_BR.md) | | ||
| | <sub>EN</sub> [English](README.md) | <sub>RU</sub> [руÑÑкий](ru/README_RU.md) | <sub>ES</sub> [Español](es/README_ES.md) | <sub>FR</sub> [Français](fr/README_FR.md) | <sub>TR</sub> [Türkçe](tr/README_TR.md) | <sub>ZH</sub> [䏿–‡](zh/README_ZH_CN.md) | <sub>BR</sub> [Português](br/README_BR.md) | |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The language labels and em-dash in this line appear to have character encoding issues. The text displays as garbled characters (e.g., "ñ", "ç", "â€"") instead of proper Unicode characters. This suggests either a file encoding problem or incorrect handling of UTF-8 characters.
| if (sign && sign.signText) { | ||
| // Check if sign exists and has signText | ||
| if (sign && sign.signText) { | ||
| assert.strictEqual(sign.signText.trimEnd(), '1\n2\n3') | ||
| } else { | ||
| console.warn('Sign or sign text is undefined, skipping text verification') | ||
| } | ||
| } else { | ||
| console.warn('Sign or sign text is undefined, skipping text verification') | ||
| } |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate nested if conditions. Lines 27-29 and 29-31 both check the exact same condition (sign && sign.signText) with identical bodies. This appears to be an accidental duplication that should be removed.
| if (sign && sign.signText) { | |
| // Check if sign exists and has signText | |
| if (sign && sign.signText) { | |
| assert.strictEqual(sign.signText.trimEnd(), '1\n2\n3') | |
| } else { | |
| console.warn('Sign or sign text is undefined, skipping text verification') | |
| } | |
| } else { | |
| console.warn('Sign or sign text is undefined, skipping text verification') | |
| } | |
| if (sign && sign.signText) { | |
| assert.strictEqual(sign.signText.trimEnd(), '1\n2\n3') | |
| } else { | |
| console.warn('Sign or sign text is undefined, skipping text verification') | |
| } |
| @@ -1,4 +1,4 @@ | |||
| { | |||
| { | |||
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file contains a Unicode BOM (Byte Order Mark) character at the start. This can cause issues with some tools and parsers. The BOM should be removed.
| { | |
| { |
| @@ -1,4 +1,4 @@ | |||
| # Mineflayer | |||
| # Mineflayer | |||
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file contains a Unicode BOM (Byte Order Mark) character at the start. This can cause issues with some tools and parsers. The BOM should be removed.
| # Mineflayer | |
| # Mineflayer |
| #### The Node Way™ | ||
|
|
||
| > "When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons." — substack from ["how I write modules"](https://gist.github.com/substack/5075355) | ||
| > "When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons." — substack from ["how I write modules"](https://gist.github.com/substack/5075355) |
Copilot
AI
Jan 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The em-dash character appears to have a character encoding issue, displaying as "â€"" instead of "—". This suggests the file encoding needs to be corrected.
|
We shouldn't update this many versions at once. Doing one after the other makes it clear what changes are being made for what specific version. We have a branch for 1.21.9 in #3754, if you can make a PR against this branch with just changes for 1.21.9/1.21.10 it will actually test the latest version in CI with latest minecraft-data PR. |
Closing this PR
As suggested by @extremeheat, splitting this into separate PRs:
pc1_21_9branch - Only changes for 1.21.9/1.21.10 supportThis approach makes it clearer what changes are being made for each specific version.
Original PR description preserved below for reference:
Summary
This PR adds support for Minecraft versions 1.21.9, 1.21.10, and 1.21.11.
This extends and supersedes the work started in PR #3796 by @HenkjanvDiermen, incorporating their timing fixes and adding support for the latest 1.21.11 version.