Open
Description
- The FAQ doesn't contain a resolution to my issue
Versions
- mineflayer: 4.26.0
- server: vanilla 1.20.5+
- node: 22.11.0
Detailed description of a problem
bot.digTime returns the time it takes to break a block. The time calculation must take into account the active item, effects, enchantments, and the block to break.
In Minecraft 1.20.4 and below, everything is taken into account.
In Minecraft 1.20.5 and above, the "Efficiency" enchantment does not affect this indicator. As a result, the bot.dig function digs the block longer than necessary.
For example:
- A diamond pickaxe without enchantments digs a cobblestone block in 400 milliseconds. bot.digTime returns 400 milliseconds and bot.dig digs the block in 400 milliseconds.
- A diamond pickaxe with the "Efficiency 5" enchantment digs a cobblestone block in 100 milliseconds. bot.digTime still returns 400 milliseconds and bot.dig digs a block of 400 milliseconds instead of the required 100 milliseconds.
What did you try yet?
I used bot.dig, bot.digTime.
Your current code
const block = bot.blockAtCursor(5)
console.log(bot.digTime = ${bot.digTime(block)} ms
)
...
const block = bot.blockAtCursor(5)
bot.dig(block, 'ignore', 'raycast')
Expected behavior
bot.digTime will take into account the enchantment on the item and as a result bot.dig will start working normally