DarkStorm652 / DarkBot

Minecraft thin client and automation framework
BSD 2-Clause "Simplified" License
124 stars 53 forks source link

No support for protocol v338 #63

Open vakkq opened 6 years ago

vakkq commented 6 years ago
[Bot] Error connecting: org.darkstorm.darkbot.minecraftbot.protocol.UnsupportedProtocolException: No protocol support for v338 found.
org.darkstorm.darkbot.minecraftbot.protocol.UnsupportedProtocolException: No protocol support for v338 found.
        at org.darkstorm.darkbot.minecraftbot.MinecraftBot.<init>(Unknown Source)
        at org.darkstorm.darkbot.minecraftbot.MinecraftBot.<init>(Unknown Source)
        at org.darkstorm.darkbot.minecraftbot.MinecraftBot$Builder.build(Unknown Source)
        at org.darkstorm.darkbot.mcwrapper.cli.CLIBotWrapper.createBot(Unknown Source)
        at org.darkstorm.darkbot.mcwrapper.cli.CLIBotWrapper.main(Unknown Source)
        at org.darkstorm.darkbot.mcwrapper.Main.main(Unknown Source)
vakkq commented 6 years ago

My name is Stanley Kenway, and I'm necroing over here!

DarkStorm652 commented 6 years ago

Protocol system is being rewritten for another project and will be ported over here. Progress is looking good. Additionally, the development-cleanup branch contains many new features that you can test on 1.7.x, like simple physics.

vakkq commented 6 years ago

How can we know when it's finished?

ghost commented 6 years ago

You only know when the code has updated. Untill then, theres nothing to do but wait!

vakkq commented 6 years ago

How to import the Gradle project? i'm stuck in eclipse ;-; I'm of course talking about the dev branch.

vakkq commented 6 years ago

Going off topic here, but after compiling it with "gradle build", i cannot run it because no main manifest attribute, in DarkBotDev3.jar

DarkStorm652 commented 6 years ago

The Gradle scripts replacing the old Ant scripts are crappy at best and have many issues. The most effective thing you can do right now is the following:

  1. Run gradle build
  2. Remove the META-INF folder from core/build/libs/core-all.jar (due to signing issues)
  3. Run java -cp "core/build/libs/core-all.jar:protocol/build/libs/DarkBot.jar" org.darkstorm.minecraft.darkbot.wrapper.Main <args> (replace : with ; on Windows)

Additionally, importing the project (via existing sources, build.gradle) in IntelliJ and setting up a run configuration for org.darkstorm.minecraft.darkbot.wrapper.Main with your arguments should work out of the box, but you know how that usually goes 😒

I hope to find some time to make the project more presentable in the near future. 1.8+ support comes first, though.

vakkq commented 6 years ago
java.lang.ClassNotFoundException: 5
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.darkstorm.minecraft.darkbot.wrapper.cli.CLIWrapperUtils.getProtocolProvider(CLIWrapperUtils.java:59)
    at org.darkstorm.minecraft.darkbot.wrapper.cli.CLISpamBotWrapper.main(CLISpamBotWrapper.java:246)
    at org.darkstorm.minecraft.darkbot.wrapper.Main.main(Main.java:47)
No protocol provider found for '5'.

It also says that I need a protocol name I typed --protocols and it seems that there are none, so I copied all protocols from the regular version. Idk where to copy it to, the error is still present.

vakkq commented 6 years ago

Also why am i getting EOFExceptions on the old version

DarkStorm652 commented 6 years ago

The protocol loader uses the Java SPI system for discovering protocols, which won't work without the protocols being specially packaged. That packaging is one of the most important things missing from the new build scripts. You can specify a protocol class explicitly instead: --protocol 'org.darkstorm.minecraft.darkbot.protocol.v5x.Protocol5X$Provider'.

There will be sporadic EOFExceptions on connection due to a race condition bug in the networking code, probably related to encryption, that I never took the time to fix. They only happen during the initial handshaking and logging in steps of connecting to a server.

undercoverGuy commented 6 years ago

Is minecraft 1.8 and up supported with the new (protocolsystem)-version?

vakkq commented 6 years ago

No, minecraft 1.8 protocol is under development.

undercoverGuy commented 6 years ago

any updates?

undercoverGuy commented 5 years ago

guess not

lol7344 commented 5 years ago

guess not

Lol I've been waiting years for him to update this bot... :( There's a pretty good API I found tho, it's named mineflayer and if you know just a little of JavaScript you can do pretty good things with it