You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read properties of undefined (reading 'targets')
at /Users/mo0p3/Documents/Projetos/MineBot/node_modules/mineflayer-collectblock/lib/CollectBlock.js:191:31
at Generator.next (<anonymous>)
at /Users/mo0p3/Documents/Projetos/MineBot/node_modules/mineflayer-collectblock/lib/CollectBlock.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/mo0p3/Documents/Projetos/MineBot/node_modules/mineflayer-collectblock/lib/CollectBlock.js:4:12)
at collect (/Users/mo0p3/Documents/Projetos/MineBot/node_modules/mineflayer-collectblock/lib/CollectBlock.js:178:16)
at collectCallbackified (node:util:304:5)
at CollectBlock.<anonymous> (/Users/mo0p3/Documents/Projetos/MineBot/node_modules/mineflayer-collectblock/lib/CollectBlock.js:185:61)
at Generator.next (<anonymous>)
at /Users/mo0p3/Documents/Projetos/MineBot/node_modules/mineflayer-collectblock/lib/CollectBlock.js:8:71
Script
/** * A quick and easy implementation of the collect block plugin. (Requires mineflayer-pathfinder and mineflayer-collectblock) */constmineflayer=require("mineflayer");constpathfinder=require("mineflayer-pathfinder").pathfinder;constcollectBlock=require("mineflayer-collectblock").plugin;constbot=mineflayer.createBot({host: "localhost",username: "TheMinner",});// Load pathfinder and collect block pluginsbot.loadPlugin(pathfinder);bot.loadPlugin(collectBlock);// Load mc dataletmcData;constdigIron=async()=>{constblock=bot.findBlock({matching: mcData.blocksByName.iron_ore.id,maxDistance: 64,});try{awaitbot.collectBlock.collect(block,{append: true,ignoreNoPath: true,chestLocations: [],itemFilter: (item)=>true,},(err)=>{if(!err){console.log("New dig!");digIron();}elseconsole.log("CALLBACK=>",err);});}catch(err){console.log(err);}};bot.once("spawn",()=>{mcData=require("minecraft-data")(bot.version);digIron();});
The text was updated successfully, but these errors were encountered:
The latest version of plugin throws
Script
The text was updated successfully, but these errors were encountered: