Jump to content

How come my bot is still spamming the entity?


3picide

Recommended Posts

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;
    }

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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