Add support for MC 1.8 protocol

Lots of changes in 1.8 protocol so a new protocol handler was necessary
Packet (de)compression done with dotNetZip Zlib compression engine
1.4.6-1.7.10 support is still there thanks to app refactoring
This commit is contained in:
ORelio 2014-09-04 13:58:49 +02:00
parent 2a8a6fadd3
commit 88b8399c5c
16 changed files with 9885 additions and 2 deletions

View file

@ -64,6 +64,9 @@ namespace MinecraftClient.Protocol
int[] supportedVersions_Protocol17 = { 4, 5 };
if (Array.IndexOf(supportedVersions_Protocol17, ProtocolVersion) > -1)
return new Protocol17Handler(Client, ProtocolVersion, Handler);
int[] supportedVersions_Protocol18 = { 47 };
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
return new Protocol18Handler(Client, ProtocolVersion, Handler);
throw new NotSupportedException("The protocol version no." + ProtocolVersion + " is not supported.");
}
@ -104,6 +107,8 @@ namespace MinecraftClient.Protocol
case "1.7.9":
case "1.7.10":
return 5;
case "1.8.0":
return 47;
default:
return 0;
}