Mark 1.7.8+ as supported

1.7.8 can be supported without any change.
Fix login in MinecraftCom using hardcoded value instead of version
This commit is contained in:
ORelio 2014-05-06 15:43:50 +02:00
parent 09bff17fc2
commit 3c84c5813e
2 changed files with 2 additions and 2 deletions

View file

@ -464,7 +464,7 @@ namespace MinecraftClient
public bool Login(string username, string uuid, string sessionID, string host, int port) public bool Login(string username, string uuid, string sessionID, string host, int port)
{ {
byte[] packet_id = getVarInt(0); byte[] packet_id = getVarInt(0);
byte[] protocol_version = getVarInt(4); byte[] protocol_version = getVarInt(protocolversion);
byte[] server_adress_val = Encoding.UTF8.GetBytes(host); byte[] server_adress_val = Encoding.UTF8.GetBytes(host);
byte[] server_adress_len = getVarInt(server_adress_val.Length); byte[] server_adress_len = getVarInt(server_adress_val.Length);
byte[] server_port = BitConverter.GetBytes((ushort)port); Array.Reverse(server_port); byte[] server_port = BitConverter.GetBytes((ushort)port); Array.Reverse(server_port);

View file

@ -143,7 +143,7 @@ namespace MinecraftClient
if (MinecraftCom.GetServerInfo(Settings.ServerIP, ref protocolversion, ref version)) if (MinecraftCom.GetServerInfo(Settings.ServerIP, ref protocolversion, ref version))
{ {
//Supported protocol version ? //Supported protocol version ?
int[] supportedVersions = { 4 }; int[] supportedVersions = { 4, 5 };
if (Array.IndexOf(supportedVersions, protocolversion) > -1) if (Array.IndexOf(supportedVersions, protocolversion) > -1)
{ {
//Load translations (Minecraft 1.6+) //Load translations (Minecraft 1.6+)