Basic support for minecraft 1.19 (#2084)

* merge commit from milutinke
* chat signature & encrypted login
* Bug fix :EncryptionResponse format error below 1.18.2
* Implemented chat command signature
* Chat message parsing and verification for 1.19
* Add signature settings
* Update Simplified Chinese Translation
* Clear up comments
* Fix wrong variable naming
* Bug fix: SignatureV2 Processing
This commit is contained in:
BruceChen 2022-08-15 23:55:44 +08:00 committed by GitHub
parent d9f1a77ac2
commit a8bbb1ac76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 5218 additions and 1174 deletions

View file

@ -179,7 +179,7 @@ namespace MinecraftClient.Protocol.Handlers
if (discriminator != FMLHandshakeDiscriminator.RegistryData)
return false;
if (protocolversion < Protocol18Handler.MC18Version)
if (protocolversion < Protocol18Handler.MC_1_8_Version)
{
// 1.7.10 and below have one registry
// with blocks and items.
@ -440,7 +440,7 @@ namespace MinecraftClient.Protocol.Handlers
/// <param name="jsonData">JSON data returned by the server</param>
/// <param name="forgeInfo">ForgeInfo to populate</param>
/// <returns>True if the server is running Forge</returns>
public static bool ServerInfoCheckForge(Json.JSONData jsonData, ref ForgeInfo forgeInfo)
public static bool ServerInfoCheckForge(Json.JSONData jsonData, ref ForgeInfo? forgeInfo)
{
return ServerInfoCheckForgeSub(jsonData, ref forgeInfo, FMLVersion.FML) // MC 1.12 and lower
|| ServerInfoCheckForgeSub(jsonData, ref forgeInfo, FMLVersion.FML2); // MC 1.13 and greater
@ -477,7 +477,7 @@ namespace MinecraftClient.Protocol.Handlers
/// <param name="forgeInfo">ForgeInfo to populate</param>
/// <param name="fmlVersion">Forge protocol version</param>
/// <returns>True if the server is running Forge</returns>
private static bool ServerInfoCheckForgeSub(Json.JSONData jsonData, ref ForgeInfo forgeInfo, FMLVersion fmlVersion)
private static bool ServerInfoCheckForgeSub(Json.JSONData jsonData, ref ForgeInfo? forgeInfo, FMLVersion fmlVersion)
{
string forgeDataTag;
string versionField;