From 977ce1e767952d69fdc4cf2428ba3cb38be95bea Mon Sep 17 00:00:00 2001 From: Kolby Nottingham Date: Wed, 6 Mar 2024 14:32:54 -0800 Subject: [PATCH] fixing previous commit --- src/agent/library/skills.js | 4 +++- src/agent/library/world.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/agent/library/skills.js b/src/agent/library/skills.js index a3732b9..700cbb7 100644 --- a/src/agent/library/skills.js +++ b/src/agent/library/skills.js @@ -359,11 +359,13 @@ export async function collectBlock(bot, blockType, num=1, exclude=null) { let blocktypes = [blockType]; if (blockType.endsWith('ore')) blocktypes.push('deepslate_'+blockType); + if (blockType === 'dirt') + blocktypes.push('grass_block'); let collected = 0; for (let i=0; i= count) + if (count !== null && blocks.length >= count) break; } }