I´m writing a programm with Java. My goal is to create a Chatbot in minecraft. But now I´m facing few problems... Mybe I should say, that I want to build myself such an "bot", because then I´am able to change certain things or create new commands.
--I´m sorry ! I now this isn´t a thread which belongs to "mods" but I dont know where it should fit in!--
I know about the protocol of Minecraft(https://wiki.vg/Protocol#Login_Start) and about how to send packets and in which form I should send these. I also know the order in which I have to send the packets (Handshake...). There are in generell 2 big steps : The first step is to build a connection to the Server (ping-pong, Handshake state 1) and the second is to authenticate the Client by sending certain packets.
First, you´re supposed to send again a handShake packet with the state 2. This process works well, but then you´re supposed to send a packet, containing your username. This process doesnt work that well, because I always get "java.io.EOFException" as a error message. I´m using standard output/input-streams. Here is the way, I´m sending packets to the server and want to send my username to the server :
output.writeByte(0x01); //hope that the length is correct
output.writeByte(0x00); //packetID
output.writeUTF("Exampleplayer");
Hope you know, how to handle with this problem ! Even if not, thank you for your time !
I´m writing a programm with Java. My goal is to create a Chatbot in minecraft. But now I´m facing few problems... Mybe I should say, that I want to build myself such an "bot", because then I´am able to change certain things or create new commands.
--I´m sorry ! I now this isn´t a thread which belongs to "mods" but I dont know where it should fit in!--
I know about the protocol of Minecraft(https://wiki.vg/Protocol#Login_Start) and about how to send packets and in which form I should send these. I also know the order in which I have to send the packets (Handshake...). There are in generell 2 big steps : The first step is to build a connection to the Server (ping-pong, Handshake state 1) and the second is to authenticate the Client by sending certain packets.
First, you´re supposed to send again a handShake packet with the state 2. This process works well, but then you´re supposed to send a packet, containing your username. This process doesnt work that well, because I always get "java.io.EOFException" as a error message. I´m using standard output/input-streams. Here is the way, I´m sending packets to the server and want to send my username to the server :
output.writeByte(0x01); //hope that the length is correct
output.writeByte(0x00); //packetID
output.writeUTF("Exampleplayer");
Hope you know, how to handle with this problem ! Even if not, thank you for your time !