Talk:Protocol FAQ: Difference between revisions

From wiki.vg
Jump to navigation Jump to search
imported>Barneygale
No edit summary
imported>ConnerGDavis
No edit summary
 
(77 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Hey, I have a different problem. Whenever I attempt to log-in to my server, I receive an IOException entitled "Received string length is less than zero! Weird string!"
I'm totally lost as to what your problem is. Store your packet types as bytes. Specify them in hex, i.e. when writing a packet, do buf.writeByte(0x32) rather than buf.writeByte(32). Wireshark should be your go-to tool for debugging - filter by tcp.port==25565, find a packet, right click > follow TCP stream [[User:Barneygale|Barneygale]] 08:07, 13 December 2011 (MST)
 
:It makes sense that the error is caused by my sending it as normal decimal versus hexadecimal, but I could swear that I just fixed that problem. I'm going to continue messing with my packet handling structure and wireshark until I get this figured out...I am positive it's just me being stupid with packets. Thanks. I'm done posting here.
Currently all my server is doing after the login request is successful is (in this order):
- Streaming relevant 49 chunks
- Sending the Compass packet
- Sending the inventory slot packets
- Sending the player position & look packet
 
It gets stuck on the chunk packets, so I know it's a problem there. I am not sending pre-chunks, because the protocol said it wasn't necessarily obligatory. I'm going to try sending those now, and see if it fixes it. Aside from that, anyone have any ideas? :/
 
UPDATE: I've fixed this, but now, it gets stuck on the byte which sends 16 - 1 (15) and it's telling me Bad packet id 15, as if it is trying to make that byte a packet itself, rather than part of the chunk packet. Removing this causes another error, telling me that the string is over the max limit (this is part of the compressed data being sent to the client.) I don't really know what is wrong. Here's my code for writing the 0x33 packet message from S->C  http://pastebin.com/A25u25eD
:Probably a problem with a previous packet you've sent, then. Dump what your server is sending and upload somewhere. [[User:Barneygale|Barneygale]] 09:00, 28 November 2011 (MST)
:This is the downstream packet I'm sending (header 33, which is identified in the documentation as the packet to send detailing a chunk.: http://pastebin.com/A25u25eD
:Hey, please help me out with this (lol) if you can you. It kinda makes me have to stop my project entirely, as I can't continue with chunk distribution, and that is my primary focus right now. Thanks :p haha
::Again, you'll need to dump what your server is sending so we can analyse it. Just write your raw bytes to a fine. Use wireshark if you have to [[User:Barneygale|Barneygale]] 21:54, 5 December 2011 (MST)

Latest revision as of 03:43, 14 December 2011

I'm totally lost as to what your problem is. Store your packet types as bytes. Specify them in hex, i.e. when writing a packet, do buf.writeByte(0x32) rather than buf.writeByte(32). Wireshark should be your go-to tool for debugging - filter by tcp.port==25565, find a packet, right click > follow TCP stream Barneygale 08:07, 13 December 2011 (MST)

It makes sense that the error is caused by my sending it as normal decimal versus hexadecimal, but I could swear that I just fixed that problem. I'm going to continue messing with my packet handling structure and wireshark until I get this figured out...I am positive it's just me being stupid with packets. Thanks. I'm done posting here.