From 0e84991ce53b231b498f33c520d4717c693daa06 Mon Sep 17 00:00:00 2001 From: MaxRobinsonTheGreat Date: Mon, 5 Feb 2024 14:05:52 -0600 Subject: [PATCH] sneaking in torch placing improvment --- src/agent/library/skills.js | 2 +- src/agent/modes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/library/skills.js b/src/agent/library/skills.js index 5c080c3..d5abb0b 100644 --- a/src/agent/library/skills.js +++ b/src/agent/library/skills.js @@ -12,7 +12,7 @@ export function log(bot, message, chat=false) { async function autoLight(bot) { if (bot.modes.isOn('torch_placing') && !bot.interrupt_code) { - let nearest_torch = world.getNearestBlock(bot, 'torch', 8); + let nearest_torch = world.getNearestBlock(bot, 'torch', 6); if (!nearest_torch) { let has_torch = bot.inventory.items().find(item => item.name === 'torch'); if (has_torch) { diff --git a/src/agent/modes.js b/src/agent/modes.js index 92d7a77..78b62a6 100644 --- a/src/agent/modes.js +++ b/src/agent/modes.js @@ -85,7 +85,7 @@ const modes = [ active: false, update: function (agent) { // TODO: check light level instead of nearby torches, block.light is broken - const near_torch = world.getNearestBlock(agent.bot, 'torch', 8); + const near_torch = world.getNearestBlock(agent.bot, 'torch', 6); if (!near_torch) { let torches = agent.bot.inventory.items().filter(item => item.name.includes('torch')); if (torches.length > 0) {