[ ] The FAQ doesn't contain a resolution to my issue
Versions
mineflayer: #.#.#
server: vanilla/spigot/paper #.#.#
node: #.#.#
Detailed description of a problem
I want to make my bot break Nether wart using blockAtCursor()
Your current code
const mineflayer = require('mineflayer');
const bot = mineflayer.createBot({
host: 'mc.hypixel.net',
port: 25565,
username: '#######',
password: '########',
version: "1.16.4",
auth: 'microsoft'
})
async function dig() {
var block = bot.blockAtCursor(5);
if (!block) return setTimeout(function() {
dig();
}, 100);
await bot.dig(block, 'ignore', 'raycast') // 2nd param: true to 'snap at block' or 'ignore' to just not turn head
dig()
}
setTimeout(async () => {
bot.chat('/play sb')
}, 3000);
setTimeout(async () => {
bot.chat('/is')
}, 4000);
setTimeout(async () => {
dig();
}, 5000);
Expected behavior
Breaks the Nether wart in front of the bot
Additional context
Im aware that blockAtCursor() doesnt work with most crops, but is there any way i can get around this? Im trying to make a bot that hold left click while going left.
Versions
Detailed description of a problem
I want to make my bot break Nether wart using blockAtCursor()
Your current code
Expected behavior
Breaks the Nether wart in front of the bot
Additional context
Im aware that blockAtCursor() doesnt work with most crops, but is there any way i can get around this? Im trying to make a bot that hold left click while going left.