Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions MinecraftClient/MinecraftCom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,7 @@ public bool Handshake(string username, string sessionID, ref string serverID, re
data[1] = protocolversion;

//short len
byte[] sh = new byte[2];
sh = BitConverter.GetBytes((short)username.Length);
byte[] sh = BitConverter.GetBytes((short)username.Length);
Array.Reverse(sh);
sh.CopyTo(data, 2);

Expand All @@ -625,7 +624,6 @@ public bool Handshake(string username, string sessionID, ref string serverID, re
name.CopyTo(data, 4);

//short len
sh = new byte[2];
sh = BitConverter.GetBytes((short)host.Length);
Array.Reverse(sh);
sh.CopyTo(data, 4 + (username.Length * 2));
Expand All @@ -636,7 +634,6 @@ public bool Handshake(string username, string sessionID, ref string serverID, re
bhost.CopyTo(data, 6 + (username.Length * 2));

//port
sh = new byte[4];
sh = BitConverter.GetBytes(port);
Array.Reverse(sh);
sh.CopyTo(data, 6 + (username.Length * 2) + (host.Length * 2));
Expand Down