Skip to content

bug with the block_dig package #3627

Open
@MrCatplay

Description

@MrCatplay
  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 4.25.0
  • server: paper
  • node: 22.14.0

Detailed description of a problem

In Minecraft version 1.19, the block_dig packet was updated to include a new sequence parameter. However, certain anti-cheat systems incorrectly flag bots or modifications that omit this parameter, leading to kicks or bans from servers. This occurs because the anti-cheat expects the updated packet structure and interprets its absence as suspicious activity.

What did you try yet?

I tried sending the block_dig packet myself with the sequence parameter, which increased every time I sent the block_dig packet, and it helped, but when the bot changes between worlds or dies or it exits the server, this value must be reset

Your current code

  bot.sequence = -1

  bot.on('death', () => {
    bot.sequence = -1
  })

  bot.on('entity_teleport', () => {
    bot.sequence = -1
  })

async function dig(bot, block) {
  bot.sequence++
  bot._client.write('block_dig', {
    "status": 0,
    "location": block,
    "face": bot.targetDigFace,
    "sequence": bot.sequence
  })

  bot._client.write('arm_animation', {
    "hand": 0
  })
}

Expected behavior

Sending a block_dig packet with four values in version above 1.19

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions