Skip to content

Ladysnake/Automatone

Repository files navigation

Automatone

Release License Code of Conduct

A serverside Minecraft pathfinder bot, based on Baritone.

Warning: this project is experimental. Although it is already performing well in vanilla, strange bugs may arise in heavily modded environments. Backwards compatibility is also not being considered at the current time, so avoid depending on this for stable projects.

There's a showcase video made by @Adovin#0730 on Baritone. Here's a (very old!) video leijurv made showing off what it can do. Tutorial playlist

To install Automatone as a user, install the Fabric loader and drop the latest optimized jar from releases. For more information, see Installation & setup. Once Automatone is installed, look here for instructions on how to use it.

This project is based on Baritone, which is itself an updated version of MineBot, the original version of the bot for Minecraft 1.8.9, rebuilt for 1.12.2 through 1.16.5. Automatone/Baritone focuses on reliability and particularly performance (it's over 30x faster than MineBot at calculating paths).

Getting Started

Here are some links to help to get started (sending you to Baritone documentation for now):

API

The API is heavily documented. The Javadocs for Automatone itself are not currently hosted anywhere, but you can find the (possibly inadequate) Javadocs for the latest release of Baritone here. Please note that usage of anything located outside of the baritone.api package is not supported by the API release jar.

Below is an example of basic usage for changing some settings, and then pathing to an X/Z goal.

IBaritone baritone = BaritoneAPI.getProvider().getBaritone(entity);
baritone.settings().allowSprint.set(true);
baritone.settings().primaryTimeoutMS.set(2000L);

baritone.getCustomGoalProcess().setGoalAndPath(new GoalXZ(10000, 20000));

Making your own non-player entity use Automatone

You need to register the relevant component for your entity, using the component factory provided by Automatone:

public final class MyComponents implements EntityComponentInitializer {
    @Override
    public void registerEntityComponentFactories(EntityComponentFactoryRegistry registry) {
        registry.registerFor(MyEntity.class, IBaritone.KEY, BaritoneAPI.getProvider().componentFactory());
    }
}

Do not forget to add that class as an entrypoint with the cardinal-components-entity key !

{
  "entrypoints": {
    "cardinal-components-entity": [
      "my.package.MyComponents"
    ]
  }
}

For more information on how components work, refer to Cardinal Components API's documentation.

FAQ

Can I use Automatone as a library in my mob mod?

That's what it's for, sure! (As long as usage complies with the LGPL 3.0 License)

Can I use Automatone to cheat?

Good luck, as of now it is completely unable to control real players.

How is it so fast?

Magic. (Hours of leijurv enduring excruciating pain)