sneaking in torch placing improvment

This commit is contained in:
MaxRobinsonTheGreat 2024-02-05 14:05:52 -06:00
parent 271f5672f4
commit 0e84991ce5
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

@ -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) {