Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot unable to break block 2 blocks above its head #47

Open
octo-kumo opened this issue Jan 10, 2021 · 5 comments
Open

Bot unable to break block 2 blocks above its head #47

octo-kumo opened this issue Jan 10, 2021 · 5 comments

Comments

@octo-kumo
Copy link

In this scenario, the bot is trying to chop trees, and it will get stuck on the block 2 blocks above its head.
I have checked the logs, the block the bot is looking at (and feed into collect block) is the correct block.

  • version: 1.12.2 (no questioning why I'm still on 1.12)

code:

collect(accepts: number[]): Promise<any> | boolean {
    if (limit < 1) return false;
    const target = this.bot.findBlock({
        matching: accepts,
        maxDistance: 64
    });
    if (target) {
        this.log('collecting', target.name, target.position.toString());
        return new Promise((resolve, reject) => this.bot.collectBlock.collect(target, (err) => {
            if (err) reject(err);
            else resolve(target);
        }));
    } else return false;
}

plz support promises thks
Screenshot 2021-01-10 at 6 23 30 PM

@TheDudeFromCI
Copy link
Member

Is there any error printed to the console?

Is the callback called?

Can you confirm the bot has permission to break the block? (I.e. not in spawn protection)

@octo-kumo
Copy link
Author

There are no errors and the callback was never called, since behind this function is a infinite recursion, if it returned it would call the same function again. I will need to test with a barebones one later.

@octo-kumo
Copy link
Author

Spawn protection is not a problem since the bot was able to break the bottom logs

@octo-kumo
Copy link
Author

Doesnt seem to work in 1.16.1 either

@JohnGrubba
Copy link

Same Problem for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants