mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Move 1.7 handling into 1.8 handler
Minecraft 1.7 handler was pretty similar to 1.8 handler and lacking some features such as packet prefetching.
This commit is contained in:
parent
729960d4a3
commit
3a760240e4
4 changed files with 172 additions and 640 deletions
|
|
@ -32,7 +32,7 @@ namespace MinecraftClient.Protocol
|
|||
try
|
||||
{
|
||||
if (Protocol16Handler.doPing(serverIP, serverPort, ref protocolversionTmp)
|
||||
|| Protocol17Handler.doPing(serverIP, serverPort, ref protocolversionTmp))
|
||||
|| Protocol18Handler.doPing(serverIP, serverPort, ref protocolversionTmp))
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
|
|
@ -67,10 +67,7 @@ namespace MinecraftClient.Protocol
|
|||
int[] supportedVersions_Protocol16 = { 51, 60, 61, 72, 73, 74, 78 };
|
||||
if (Array.IndexOf(supportedVersions_Protocol16, ProtocolVersion) > -1)
|
||||
return new Protocol16Handler(Client, ProtocolVersion, Handler);
|
||||
int[] supportedVersions_Protocol17 = { 4, 5 };
|
||||
if (Array.IndexOf(supportedVersions_Protocol17, ProtocolVersion) > -1)
|
||||
return new Protocol17Handler(Client, ProtocolVersion, Handler);
|
||||
int[] supportedVersions_Protocol18 = { 47 };
|
||||
int[] supportedVersions_Protocol18 = { 4, 5, 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.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue