fador/mineserver — pull request #191 by fredreichbier (2012-04-05 12:50:37+00:00)
Title: Protocol fixes

These are some protocol-related fixes:

* Titles of windows (workbenches, furnaces, chests) are now sent in UCS-2 encoding. I couldn't find any information saying that they should be sent as UTF-8, and this seems to fix bug #188.
* "Set Slot" messages now include the "enchantment data" which is [needed for some items](http://wiki.vg/Slot_Data). Currently, no actual data is sent, but it seems to be important to send a length of `-1` in this case. This should fix the "Not in GZIP format" crashes that probably happened because the client read a bogus length and tried to read GZIP data from the stream.
* Likewise, the server now reads enchantment data from the client, ie. it reads the length and prints a debug message if it isn't `-1`. This is probably not the best solution. :P

Anyway, these changes work for me, but please test them! Protocol stuff is fun sometimes. ;)