Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

More API example code

SIGSTACKFAULT opened this issue · 11 comments

commented

Literally write example API usage code.

I mean, yeah, I can read ExampleBaritoneControl.java but that doesn't help much. Where do I put it? What do I use to compile it?

Context

For example, I wanted to write code that would have baritone dig a stairwell of height n, stopping when it reaces a given y-level. That seems like a sufficiently arbitrary first thing to do

Final checklist

  • I have not used any OwO's or UwU's in this issue.
commented

I briefly considered opening an issue for "connect a scripting language to Baritone" (jython?) but that's probably worse and already done somewhere I don't know about or something

commented

I already know java, but don't know what to write because there's no example code, and don't know where to put it because there's no instructions on how to build and link it.

commented

e.g., if I said "I want to script baritone to dig a stairwell, how do I do that?" what's the first thing you'd link me to?

commented

No need to hook a scripting language up to it. Just learn Java.

commented

tbh a script is not that bad of an idea. Many people have ideas for a baritone process but know nothing about programming. For them a script might still be an ambitious task but much easier. This also allows for more flexibility. Like if you need baritone to do something simple you don't have to fork baritone and add a new process (skipping understanding everything) and then only after you built it and restarted you can use it. A script could just be added and then used while in game.

commented

@IronException assuming we go with my Jython idea, I'll write the Python code if you write the Java code.

Example implementation: literally the current command system

commented

cringe

commented

@0-x-2-2 what?

commented

I'm going to create a separate issue for the scripting thing. #881

commented

The Example API code is ExampleBaritoneControl. Using the Baritone API it requires you to know how to set up a modded Minecraft development environment with ForgeGradle and how to properly add other compiled mods to the development environment.

What do I use to compile it?

It also requires that you know how to compile java programs.

I'm going to create a separate issue for the scripting thing. #881

#881 (comment)