Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Getting an error when trying to start a mine process

Jeremys556 opened this issue ยท 6 comments

commented

What do you need help with?

Trying to start a mine process with the Forge Baritone API. Not sure if this was a bug or I'm just stupid so I marked it as question.

Here is the line in my code thats causing the error/trying to start mine process:
BaritoneAPI.getProvider().getPrimaryBaritone().getMineProcess().mineByName("diamond_ore");

Here is the error I'm getting in the log files:
[18:44:00] [Server thread/WARN] [net.minecraft.command.CommandHandler]: Couldn't process command: minereturn 193 63 330 diamond_ore java.lang.IllegalStateException: null at baritone.fn.<init>(Unknown Source) ~[fn.class:?] at baritone.cj.<init>(Unknown Source) ~[cj.class:?] at baritone.cj.<init>(Unknown Source) ~[cj.class:?] at baritone.fc.mine(Unknown Source) ~[fc.class:?] at baritone.fc.mineByName(Unknown Source) ~[fc.class:?] at baritone.api.process.IMineProcess.mineByName(Unknown Source) ~[IMineProcess.class:?] at com.jeremys556.baritoneextras.commands.commandMineReturn.func_184881_a(commandMineReturn.java:65) ~[commandMineReturn.class:1.0] at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:119) [bj.class:?] at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:91) [bj.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:962) [pa.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:941) [pa.class:?] at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?] at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_51] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_51] at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) [chd.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]

Here is a pastebin for the error if that makes it easier: https://pastebin.com/yXp8XZ26

You may have to explain the error simply, I'm not good with Java.
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

minereturn 193 63 330 diamond_ore that's not a valid command

commented

That is a custom command in my mod. Did I just register it wrong? I think it is the mine process because before I had it just type in chat and that worked fine. It only broke when I tried to make a mine process. I also believe it is the mine process line because in the log it says [fc.class:?] at baritone.fc.mineByName(Unknown Source) ~[fc.class:?] at baritone.api.process.IMineProcess.mineByName(Unknown Source) ~[IMineProcess.class:?] at com.jeremys556.baritoneextras.commands.commandMineReturn.func_184881_a(commandMineReturn.java:65) ~

At the end, it shows that the errored line in my code is line 65, in my code line 65 is: BaritoneAPI.getProvider().getPrimaryBaritone().getMineProcess().mineByName("diamond_ore");

Did I just understand the error wrong?

commented

Well your mod doesn't register the command properly somewhere

commented

I commented out the mine process line, and replaced it with this: sender.sendMessage(new TextComponentString("This is where mine process would go"));

This ran perfectly fine. I changed nothing else. Wouldn't this mean something is wrong with the Baritone API call?

commented

This would mean it doesn't work with your custom command

commented

This is the class I have for the minereturn command (command causing the issue): https://pastebin.com/Syz4f0K4

Do you have any clue why it might not work with the command?
I have no clue what it could be/how to fix it.
Thanks!