mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-22 06:02:07 +02:00
fixed torch placer bug
This commit is contained in:
parent
03b449d763
commit
b9f2f74df4
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ const modes = [
|
||||||
// TODO: check light level instead of nearby torches, block.light is broken
|
// TODO: check light level instead of nearby torches, block.light is broken
|
||||||
const near_torch = world.getNearestBlock(agent.bot, 'torch', 6);
|
const near_torch = world.getNearestBlock(agent.bot, 'torch', 6);
|
||||||
if (!near_torch) {
|
if (!near_torch) {
|
||||||
let torches = agent.bot.inventory.items().filter(item => item.name.includes('torch'));
|
let torches = agent.bot.inventory.items().filter(item => item.name === 'torch');
|
||||||
if (torches.length > 0) {
|
if (torches.length > 0) {
|
||||||
const torch = torches[0];
|
const torch = torches[0];
|
||||||
const pos = agent.bot.entity.position;
|
const pos = agent.bot.entity.position;
|
||||||
|
|
Loading…
Add table
Reference in a new issue