sneak fix

This commit is contained in:
MaxRobinsonTheGreat 2024-05-29 21:54:47 -05:00
parent 449e3da221
commit 1fa2d0d267
2 changed files with 3 additions and 3 deletions

View file

@ -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
],

View file

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