Baritone-API throwing NoClassDefFoundError: bei
Stelath opened this issue ยท 8 comments
What do you need help with?
I am currently coding a Minecraft bot using the mcprotocollib, and I added the baritone API to my java library and imported it using:
import baritone.api.BaritoneAPI;
import baritone.api.pathing.goals.GoalXZ;
The issue arises after I connect to the server, once I get the "ServerJoinGamePacket" which confirms my client has joined the game I run the Baritone-API setGoalAndPath. This then throws the error, I also can't change the BaritoneAPI settings as adding ".value" to the end seems to be invalid.
if(event.getPacket() instanceof ServerJoinGamePacket)
{
event.getSession().send(new ClientChatPacket("Testing"));
// Run Baritone Run Command
BaritoneAPI.getSettings().allowSprint.value = true;
BaritoneAPI.getSettings().primaryTimeoutMS.value = 2000L;
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalXZ(10000, 20000));
}
Edit, Error Message Thrown when Ran:
java.lang.NoClassDefFoundError: bei
at baritone.api.Settings.<init>(Unknown Source)
at baritone.api.BaritoneAPI.<clinit>(Unknown Source)
at com.stelath.bot.BotPacketHandler$1.packetReceived(BotPacketHandler.java:45)
at com.github.steveice10.packetlib.event.session.PacketReceivedEvent.call(PacketReceivedEvent.java:51)
at com.github.steveice10.packetlib.tcp.TcpSession.callEvent(TcpSession.java:149)
at com.github.steveice10.packetlib.tcp.TcpSession$3.run(TcpSession.java:324)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.ClassNotFoundException: bei
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
Final checklist
- I know how to properly use checkboxes
- I have not used any OwO's or UwU's in this issue.
- I have resolved this issue.
@Dominikaaaa Unfortunately, .getValue() doesn't work for the settings and the main problem was the NoClassDefFoundError: bei
@Dominikaaaa Sorry, I don't want to bother you much more but, can you clarify that a bit more?
Edit: I used the Baritone-api.jar as my library
You're using the wrong jar in the wrong environment probably. Meaning you're using an obfuscated jar in a developer environment or an unobfuscated jar in a normal environment
Sorry to bother you again but how would I get an unobfuscated jar? Would I build it using the source code download with Gradle? Or is it the Baritone-API jar on the releases page?
@Dominikaaaa please read the above comment