1

Minecraft protocol help

StaticShadow's Avatar StaticShadow11/24/15 6:35 pm
1 emeralds 238
Hello! I'm currently working to figure out how to properly use Minecraft's protocol. I'm doing this by joining a Minecraft server like a custom client would.

Currently, I've hit a bump in the road. After sending the encryption response packet, I get errors in the server console and the returned packet is always wonky. Here's a sample of the returned console text:
[INFO] Disconnection /127.0.0.1:55074: Failed to verify username!
[ERROR] Username 'footballfan12' tried to join with an invalid session

[INFO] /127.0.0.1:55074 lost connection: Failed to verify username!



The Github can be found here. The main file is src/main/java/Test.java. Keep in mind, it's a bit messy. I'll clean it up once I get the joining process completed. Basically, if you can help me figure out where I'm going wrong, I'd greatly appreciate it. If you need it, a protocol wiki can be found here.

EDIT:
Now getting different console output. (Messed with code more). Console output:

[18:13:52 INFO]: com.mojang.authlib.GameProfile@5350f217[id=<null>,name=footballfan12,properties={},legacy=false] (/127.
0.0.1:55964) lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsExc
eption: readerIndex(4) + length(896) exceeds writerIndex(261): UnpooledHeapByteBuf(ridx: 4, widx: 261, cap: 261)
Posted by StaticShadow's Avatar
StaticShadow
Level 1 : New Miner
0

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome