Update version to 1.18.2 (#1961)

This commit is contained in:
Leon Heuer 2022-03-21 23:29:16 +01:00 committed by GitHub
parent 41950c8b20
commit a202f31aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View file

@ -32,7 +32,7 @@ namespace MinecraftClient
public const string Version = MCHighestVersion;
public const string MCLowestVersion = "1.4.6";
public const string MCHighestVersion = "1.18.1";
public const string MCHighestVersion = "1.18.2";
public static readonly string BuildInfo = null;
private static Thread offlinePrompt = null;

View file

@ -51,7 +51,7 @@ namespace MinecraftClient.Protocol.Handlers
public PacketTypePalette GetTypeHandler(int protocol)
{
PacketTypePalette p;
if (protocol > Protocol18Handler.MC1181Version)
if (protocol > Protocol18Handler.MC1182Version)
throw new NotImplementedException(Translations.Get("exception.palette.packet"));
if (protocol <= Protocol18Handler.MC18Version)
p = new PacketPalette17();

View file

@ -53,6 +53,7 @@ namespace MinecraftClient.Protocol.Handlers
internal const int MC117Version = 755;
internal const int MC1171Version = 756;
internal const int MC1181Version = 757;
internal const int MC1182Version = 758;
private int compression_treshold = 0;
private bool autocomplete_received = false;

View file

@ -127,7 +127,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_Protocol18 = { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401, 404, 477, 480, 485, 490, 498, 573, 575, 578, 735, 736, 751, 753, 754, 755, 756, 757 };
int[] supportedVersions_Protocol18 = { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401, 404, 477, 480, 485, 490, 498, 573, 575, 578, 735, 736, 751, 753, 754, 755, 756, 757, 758 };
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
throw new NotSupportedException(Translations.Get("exception.version_unsupport", ProtocolVersion));
@ -253,6 +253,8 @@ namespace MinecraftClient.Protocol
case "1.18":
case "1.18.1":
return 757;
case "1.18.2":
return 758;
default:
return 0;
}
@ -317,6 +319,7 @@ namespace MinecraftClient.Protocol
case 755: return "1.17";
case 756: return "1.17.1";
case 757: return "1.18.1";
case 758: return "1.18.2";
default: return "0.0";
}
}