Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Baritone Add-ons?

skyedoesgaming opened this issue ยท 2 comments

commented

What do you need help with?

Ive heard many videos of people making addons such as being able to put things in storage after getting a certain amount of items, being able to transport using fly instead of normal walking ,etc. How would I be able to make a modification/addon that would let me be able to do things such as - make the baritone bot put things in shulkers, or anything else.

Final checklist

  • I know how to properly use check boxes
  • I have not used any OwO's or UwU's in this issue.
commented

I'm using JsMacro to create "mod" / smart macro, to do task like opening a chest. I'm using baritone for digging or moving to a specific coord.
To use Baritone API with JsMacro :

let BaritoneAPI = Java.type("baritone.api.BaritoneAPI")
let bapi = BaritoneAPI.getProvider().getPrimaryBaritone()
baritone = bapi.getCommandManager()
baritone.execute("goto 0 70 0")



const AbstractGameEventListener = Java.type("baritone.api.event.listener.AbstractGameEventListener");

const gameEventListenerProxyBuilder = Reflection.createClassProxyBuilder(AbstractGameEventListener);
gameEventListenerProxyBuilder.addMethod("onPathEvent", JavaWrapper.methodToJavaAsync((self, args) => {
    
}));

const listener = gameEventListenerProxyBuilder.buildInstance([]);

Java.type("baritone.api.BaritoneAPI").getProvider().getPrimaryBaritone().getGameEventHandler().registerEventListener(listener);
commented

The "Add-on System" is Minecraft modding. Baritone has an API you can access from anything that can call arbitrary Java methods. Usually people use a normal Minecraft mod, but as @XeraFiu-YTB pointed out you can just as well use an appropriate macro mod (though their example looks more complicated than a simple mod).