#3731·mineflayer

Buckets don't work

Author: MaxRobinsonTheGreatCreated Sep 4, 2025Updated Sep 17, 2026
Labelspossible bugStage1
  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 4.33
  • server: vanilla 1.21, 1.20, 1.19 (found no working MC version)
  • node: 22.11.0

Detailed description of a problem

The bot will not use buckets to place water, lava, etc. It looks at the target, waves its arm, but does nothing. No errors or logs besides a placeBlock timeout.

What did you try yet?

I've tried placeBlock, activateBlock, and activateItem. I've used lookAt beforehand too.

Your current code

javascript
import mineflayer from 'mineflayer';
import Vec3 from 'vec3';

const bot = mineflayer.createBot({
    host: 'localhost',  
    port: 55916,
    username: 'bot',
});

bot.on('login', async () => {
    bot.on('chat', async (username, message) => {
        // equip water bucket
        await bot.equip(bot.inventory.items().find(item => item.name.includes('water_bucket')), 'hand');
        let ground = bot.blockAt(bot.entity.position.offset(0, 0, 0));

        // method 1: place water bucket
        await bot.placeBlock(ground, new Vec3(0, 1, 0));
        
        // method 2: activate water bucket
        await bot.activateBlock(ground);
    });
});

Expected behavior

The bucket should emptied and its contents placed in world.

Additional context

Related issue #3428