Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Is there an example repo of fabricmc and baritoneapi for 1.20.4?

keygun-development opened this issue ยท 2 comments

commented

What do you need help with?

I'm a complete noob when it comes to modding in minecraft, I have some Java experience, but I can't seem to figure out how to set up the fabricmc gradle project including the baritoneapi version 1.10.2

I have tried following this 1.16 example: https://github.com/wagyourtail/baritone-api-fabric-example but without much success.
I tried starting the client, but I'm getting a ClassNotFoundException which I find very strange: Caused by: java.lang.ClassNotFoundException: dev.babbaj.pathfinder.NetherPathfinder.

I've changed the following in my build.gradle file:

repositories {
	flatDir {
		dirs 'libs'
	}
}


dependencies {
	// To change the versions see the gradle.properties file
	minecraft "com.mojang:minecraft:${project.minecraft_version}"
	mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
	modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

	// Fabric API. This is technically optional, but you probably want it anyway.
	modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

	modImplementation "baritone-api-fabric:baritone-api-fabric:1.10.2"
	
}

I've added the baritone-api-fabric-1.10.2.jar file to the libs/ directory.
I think my project structure is correct I'm using Java Version 17 and for the libraries just the baritone-api-fabric-1.10.2 library and some Gradle libraries.

Is this a known issue? Or am I missing something? Let me know if you need anymore details about the project structure or setup. Thanks in advance!

Final checklist

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

Oh I actually stumbled upon the very same thing few minutes ago.

The API doesn't package that library related to Nether Path Finder, so you need to include it yourself.

In your build.gradle file:

  • Within repositories, add
    maven {
        name = 'babbaj-repo'
        url = 'https://babbaj.github.io/maven/'
    }
    
  • Within dependecies, add
    implementation "dev.babbaj:nether-pathfinder:1.4.1"
    

This should do it. Godspeed!

commented

@CofiPRT Thanks, this works!