File size: 475 Bytes
36ba3ef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
async function gatherDirt(bot) {
bot.chat('Gathering dirt started');
const dirtBlock = await exploreUntil(bot, new Vec3(1, -1, 1), 60, () => {
const dirt = bot.findBlock({
matching: mcData.blocksByName["dirt"].id,
maxDistance: 32
});
return dirt;
});
if (!dirtBlock) {
bot.chat("No dirt block found.");
return;
}
await mineBlock(bot, "dirt", 16);
bot.chat("Mined 16 dirt blocks.");
} |