Jump to content

How come my bot is still spamming the entity?


Recommended Posts

Posted

I'm just following Explv's introduction for making a simple woodcutting bot.
I'm following exactly what he's doing, but my bot is still spamming an entity when it's interacting with it.

I assume it's outdated, or maybe I'm missing something here. If someone could help me, that would be great, thanks!

onLoop method:

    @Override
    public int onLoop() throws InterruptedException {


        Entity tree = getObjects().closest("Tree");
        if (tree != null && tree.interact("Chop down")) {
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return myPlayer().isAnimating() || !tree.exists();
                }
            }.sleep();
        }

        return 0;
    }

 

Posted
2 hours ago, 3picide said:

I'm just following Explv's introduction for making a simple woodcutting bot.
I'm following exactly what he's doing, but my bot is still spamming an entity when it's interacting with it.

I assume it's outdated, or maybe I'm missing something here. If someone could help me, that would be great, thanks!

onLoop method:

    @Override
    public int onLoop() throws InterruptedException {


        Entity tree = getObjects().closest("Tree");
        if (tree != null && tree.interact("Chop down")) {
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return myPlayer().isAnimating() || !tree.exists();
                }
            }.sleep();
        }

        return 0;
    }

 

You'll want to check this out: 

I also made a YouTube video about this a while back:

 

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...