mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-01 04:45:40 +02:00
sneak fix
This commit is contained in:
parent
449e3da221
commit
1fa2d0d267
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
],
|
||||
|
|
|
@ -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') {
|
||||
|
|
Loading…
Add table
Reference in a new issue