Crafted armour is equiped

This commit is contained in:
BF5258 2024-09-25 11:44:21 +10:00
parent 58fb27cd66
commit f44e6ee19e

View file

@ -109,6 +109,11 @@ export async function craftRecipe(bot, itemName, num=1) {
if (placedTable) {
await collectBlock(bot, 'crafting_table', 1);
}
//Equip any armor the bot may have crafted.
//There is probablly a more efficient method than checking the entire inventory but this is all mineflayer-armor-manager provides. :P
bot.armorManager.equipAll();
return true;
}