Skip to content

Conversation

@atiweb
Copy link

@atiweb atiweb commented Jan 1, 2026

Closing this PR

As suggested by @extremeheat, splitting this into separate PRs:

  1. PR against pc1_21_9 branch - Only changes for 1.21.9/1.21.10 support
  2. Separate PR for 1.21.11 - Will be submitted after 1.21.9/1.21.10 is merged

This 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.

- 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
Copilot AI review requested due to automatic review settings January 1, 2026 04:31
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmineflayer-pathfinder@​2.4.58710010080100
Addedgh-helpers@​1.2.0100100100100100

View full report

Copy link

Copilot AI left a 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-data to ^3.102.0 and minecraft-protocol to ^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')
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
const { Vec3 } = require('vec3')
const { Vec3 } = require('vec3')

Copilot uses AI. Check for mistakes.
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' })
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
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'
})

Copilot uses AI. Check for mistakes.
@@ -1,10 +1,8 @@
const { once } = require('../../lib/promise_utils')
const { once } = require('../../lib/promise_utils')
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
const { once } = require('../../lib/promise_utils')
const { once } = require('../../lib/promise_utils')

Copilot uses AI. Check for mistakes.
@@ -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']
Copy link

Copilot AI Jan 1, 2026

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.

Copilot uses AI. Check for mistakes.
[![Official Discord](https://img.shields.io/static/v1.svg?label=OFFICIAL&message=DISCORD&color=blue&logo=discord&style=for-the-badge)](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) |
Copy link

Copilot AI Jan 1, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +36
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')
}
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
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')
}

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
{
{
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
{
{

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
# Mineflayer
# Mineflayer
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
# Mineflayer
# Mineflayer

Copilot uses AI. Check for mistakes.
#### The Node Way&trade;

> "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)
Copy link

Copilot AI Jan 1, 2026

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.

Copilot uses AI. Check for mistakes.
@extremeheat
Copy link
Member

extremeheat commented Jan 1, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants