Skip to content

Bot freezes in mid-air after taking knockback on 1.21.11 #3887

@Lavrine

Description

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

Versions

  • mineflayer: latest
  • server: paper 1.21.11
  • node: 24.14.1

Detailed description of a problem

When the bot takes damage and tries taking knockback, it completely freezes in mid-air and doesnt take the knockback. Gravity stops applying to it entirely, and it just floats there permanently instead of falling back down.

What did you try yet?

I also tried downgrading to older mineflayer versions.
I stripped out all plugins (mineflayer-pvp, mineflayer-pathfinder) to make sure it wasn't a third-party issue. The bug still happens on barebones mineflayer. It looks like the physics engine desyncs or stalls specifically on 1.21.11 when vertical velocity is applied from a hit.
Did you try any example? Any error from those? I ran the basic echo.js, bot doesnt get any errors but still freezes
I also tried enabling flight in the server properties but didnt work either.

Your current code

import * as mineflayer from 'mineflayer';

const bot = mineflayer.createBot({
    host: 'localhost',
    port: 25565,
    auth: 'microsoft',
    username: 'LavsArbeitskraft',
    version: '1.21.11',
    physicsEnabled: true
});

bot.once('spawn', () => {
    console.log('Bot spawned');
});

Expected behavior

The bot should take knockback, fall back to the ground normally and not freeze.

Additional context

I tested the bot on a local server, with and without carpet and fabric.

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