Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Can't make Baritone work with Forge

samjviana opened this issue ยท 7 comments

commented

Some information

Operating system: Windows 10 Pro
Java version:
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.282-b08, mixed mode)
Minecraft version: 1.16.5
Baritone version: 1.6.3
Forge mods (if used): None

Exception, error or logs

Link to debug.log for better reading:
https://gist.github.com/samjviana/673a527fc2c0ca10e8d385d0fb871f58

How to reproduce

When trying to use functions of the BaritoneAPI lib, various classses are not found returning something like: java.lang.NoClassDefFoundError: blx, or even the declaration of some functions: IBaritone getBaritoneForPlayer(dzm arg0) { ... }

Final checklist

  • I know how to properly use check boxes
  • I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
  • I have included logs, exceptions and / or steps to reproduce the issue.
  • I have not used any OwO's or UwU's in this issue.
commented

looks like you're trying to use the tweaker version with forge. for forge use one of the versions (api is generally best) that ends with forge-1.6.3.jar and put it in your mods folder

commented

You're right, just replaced the baritone-api-1.6.3 with baritone-api-forge-1.6.3 and the "obfuscation" erros stopped.
But now im getting an Mixin error:
Mixin apply failed mixins.baritone.json:MixinEntity -> net.minecraft.entity.Entity: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException @Shadow field field_70177_z was not located in the target class net.minecraft.entity.Entity. Using refmap mixins.baritone.refmap.json
Just in case i'll also upload the debug.log

commented

So after a lot of testing i was abble to get it working by building Baritone 1.16.5 myself, don't know what's wrong with the .jar i download from "Releases" page.
One more thing that was a problem is the Baritone 1.16.5 project, when i try to build the Forge files the comand ./gradlew build -Pbaritone.forge_build returns Task '.forge_build' not found in root project 'baritone'., i kinda forced it to compile the Forge files by changing all the lines that verify the baritone.forge_build to if (getProject().hasProperty("baritone.forge_build") || true).

commented

I think i'll leave Baritone in a bench a while ... i'm getting the following error when i try to initialize the BaritoneAPI:
Obs.: VSCode can't seem to get the sources of the Baritone class // Failed to get sources. Instead, stub sources have been generated by the disassembler. // Implementation of methods is unavailable.

java.lang.NoSuchFieldError: field_150346_d
at baritone.api.Settings.(Unknown Source)
at baritone.api.BaritoneAPI.(Unknown Source)
at net.ddns.samjviana.bunchofthings.ClientEventSubscriber.onClientTick(ClientEventSubscriber.java:98)
at net.minecraftforge.eventbus.ASMEventHandler_15_ClientEventSubscriber_onClientTick_ClientTickEvent.invoke(.dynamic)
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
at net.minecraftforge.fml.hooks.BasicEventHooks.onPostClientTick(BasicEventHooks.java:110)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1589)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:979)
at net.minecraft.client.Minecraft.run(Minecraft.java:612)
at net.minecraft.client.main.Main.main(Main.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52)
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82)
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105)

commented

Just ran into the mixin error, building baritone from src now

also why provide broken jars??

commented

nvm im mad, was in a dev env without obf.

commented

Ok good, thanks for fixing it yourself.