mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-23 08:25:19 +02:00
sneaking in torch placing improvment
This commit is contained in:
parent
271f5672f4
commit
0e84991ce5
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue