diff --git a/settings.js b/settings.js index 9f57d62..354eb13 100644 --- a/settings.js +++ b/settings.js @@ -6,7 +6,7 @@ export default "auth": "offline", // or "microsoft" "profiles": [ - "./andy.json" + "./andy.json", // add more profiles here, check ./profiles/ for more // more than 1 profile will require you to /msg each bot indivually ], diff --git a/src/agent/modes.js b/src/agent/modes.js index aed2fc4..9a32c0e 100644 --- a/src/agent/modes.js +++ b/src/agent/modes.js @@ -24,8 +24,8 @@ const modes = [ fall_blocks: ['sand', 'gravel', 'concrete_powder'], // includes matching substrings like 'sandstone' and 'red_sand' update: async function (agent) { const bot = agent.bot; - const block = bot.blockAt(bot.entity.position); - const blockAbove = bot.blockAt(bot.entity.position.offset(0, 1, 0)); + let block = bot.blockAt(bot.entity.position); + let blockAbove = bot.blockAt(bot.entity.position.offset(0, 1, 0)); if (!block) block = {name: 'air'}; // hacky fix when blocks are not loaded if (!blockAbove) blockAbove = {name: 'air'}; if (blockAbove.name === 'water' || blockAbove.name === 'flowing_water') {