Get the files on 9Minecraft
Contents (5)
Because Baritone ships an api artifact under LGPL 3.0, other mods and custom clients can drive it programmatically. Add the baritone-api jar as a dependency (compile against the API package baritone.api), then control the primary Baritone instance.
Minimal example
import baritone.api.BaritoneAPI;
import baritone.api.pathing.goals.GoalXZ;
import baritone.api.pathing.goals.GoalBlock;
// Tune settings
BaritoneAPI.getSettings().allowSprint.value = true;
BaritoneAPI.getSettings().primaryTimeoutMS.value = 2000L;
// Send Baritone to an X/Z coordinate
BaritoneAPI.getProvider().getPrimaryBaritone()
.getCustomGoalProcess()
.setGoalAndPath(new GoalXZ(10000, 20000));
Key entry points
BaritoneAPI.getProvider().getPrimaryBaritone()→ the activeIBaritone.IBaritone.getCustomGoalProcess()→setGoalAndPath(Goal),setGoal(Goal),path().IBaritone.getPathingBehavior()→ cancel, status, current path.IBaritone.getMineProcess().mine(...)→ start an auto-mine task.IBaritone.getBuilderProcess().build(...)→ build a schematic.IBaritone.getExploreProcess()/getFollowProcess()→ exploration and following.BaritoneAPI.getSettings()→ every setting as a typed, mutable field.
Goal classes (package baritone.api.pathing.goals)
GoalBlock, GoalXZ, GoalYLevel, GoalNear, GoalGetToBlock, GoalComposite, GoalRunAway — construct one and hand it to setGoalAndPath.
Remember: distributing a client that bundles Baritone means complying with LGPL 3.0 (keep Baritone's source available and attributed).












