Update version to 1.18 (#1836)

This commit is contained in:
ReinforceZwei 2021-12-02 21:07:57 +08:00 committed by GitHub
parent 6918a64c47
commit 9a9245f193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 194 additions and 5 deletions

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 };
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 };
if (Array.IndexOf(supportedVersions_Protocol18, ProtocolVersion) > -1)
return new Protocol18Handler(Client, ProtocolVersion, Handler, forgeInfo);
throw new NotSupportedException(Translations.Get("exception.version_unsupport", ProtocolVersion));
@ -250,6 +250,8 @@ namespace MinecraftClient.Protocol
return 755;
case "1.17.1":
return 756;
case "1.18":
return 757;
default:
return 0;
}
@ -313,6 +315,7 @@ namespace MinecraftClient.Protocol
case 754: return "1.16.5";
case 755: return "1.17";
case 756: return "1.17.1";
case 757: return "1.18";
default: return "0.0";
}
}