mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-02 13:25:31 +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"
|
"auth": "offline", // or "microsoft"
|
||||||
|
|
||||||
"profiles": [
|
"profiles": [
|
||||||
"./andy.json"
|
"./andy.json",
|
||||||
// add more profiles here, check ./profiles/ for more
|
// add more profiles here, check ./profiles/ for more
|
||||||
// more than 1 profile will require you to /msg each bot indivually
|
// 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'
|
fall_blocks: ['sand', 'gravel', 'concrete_powder'], // includes matching substrings like 'sandstone' and 'red_sand'
|
||||||
update: async function (agent) {
|
update: async function (agent) {
|
||||||
const bot = agent.bot;
|
const bot = agent.bot;
|
||||||
const block = bot.blockAt(bot.entity.position);
|
let block = bot.blockAt(bot.entity.position);
|
||||||
const blockAbove = bot.blockAt(bot.entity.position.offset(0, 1, 0));
|
let blockAbove = bot.blockAt(bot.entity.position.offset(0, 1, 0));
|
||||||
if (!block) block = {name: 'air'}; // hacky fix when blocks are not loaded
|
if (!block) block = {name: 'air'}; // hacky fix when blocks are not loaded
|
||||||
if (!blockAbove) blockAbove = {name: 'air'};
|
if (!blockAbove) blockAbove = {name: 'air'};
|
||||||
if (blockAbove.name === 'water' || blockAbove.name === 'flowing_water') {
|
if (blockAbove.name === 'water' || blockAbove.name === 'flowing_water') {
|
||||||
|
|
Loading…
Add table
Reference in a new issue