Closed uwuv3 closed 5 months ago
Yep, this because of off-hand, i added this to loop,its solved
if (bot.inventory.slots[bot.getEquipmentDestSlot("off-hand")]) {
const oldItem = bot.inventory.slots[bot.getEquipmentDestSlot("off-hand")];
if (!oldItem) return
await bot.equip(oldItem, "hand");
}
Versions
Detailed description of a problem
I wanted to make a farming boot for the server and I wanted to put it in a crate for him to put things in, but when I was putting things in (potatoes) Error: Can't find potato in slots [54 - 90], (item id: 1091) error appeared
What did you try yet?
I Try copy farmer bot from "https://github.com/MakkusuOtaku/mc-farmer/tree/main"
Your current code
Expected behavior
Error: Can't find potato in slots [54 - 90], (item id: 1091) at transferOne (C:\Users\shopu\OneDrive\Desktop\ometmcbot\node_modules\mineflayer\lib\plugins\inventory.js:277:32) at transfer (C:\Users\shopu\OneDrive\Desktop\ometmcbot\node_modules\mineflayer\lib\plugins\inventory.js:263:11) at window.deposit (C:\Users\shopu\OneDrive\Desktop\ometmcbot\node_modules\mineflayer\lib\plugins\inventory.js:360:13) at depositLoop (C:\Users\shopu\OneDrive\Desktop\ometmcbot\dist\index.js:108:29) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async loop (C:\Users\shopu\OneDrive\Desktop\ometmcbot\dist\index.js:67:13)
Node.js v21.7.1
I think this causes offhand slot