robotman3000 / DragonProxy

A proxy for Minecraft Pocket Edition connecting to Minecraft PC servers, such as Mineplex.
http://dragonet.org
GNU General Public License v3.0
8 stars 1 forks source link

Fix skin NegativeArraySizeException #18

Closed DaMatrix closed 7 years ago

DaMatrix commented 7 years ago

This is an ugly yet functional fix for PE players joining. The base64 string that is applied in case of an error is the default Steve skin.

robotman3000 commented 7 years ago

This looks good and I will most likely accept this, but I have a few questions out of curiosity. First, did you experience this exception or are you just fixing a potential problem? Second, would it be easily possible to remove the nukkit dependency? And third, you have commented out code about the client getting disconnected. Would you be able to tell me more about that? If the problem is caused by a bug you could create an issue so the conversation will be there instead. Thanks.

DaMatrix commented 7 years ago

1) I'm unable to connect without this, regardless of what skin I'm using I get a NegativeArraySizeException (I tried 5 or 6 different skins, as well as the default Steve and Alex ones) 2) Yeah, that's a simple matter of taking the text from that class and pasting it in. I'll fix that in a moment. 3) That's a thing I was testing that I staged for some reason :/ when the PE client connects, I get the login packet printed out in the log and then a message saying that "client was disconnected for reason 'null'", I'll remove that code in a moment.