diff --git a/MinecraftClient/Crypto/AesCfb8Stream.cs b/MinecraftClient/Crypto/AesCfb8Stream.cs index b2e769cf..aac0443d 100644 --- a/MinecraftClient/Crypto/AesCfb8Stream.cs +++ b/MinecraftClient/Crypto/AesCfb8Stream.cs @@ -28,7 +28,7 @@ namespace MinecraftClient.Crypto { BaseStream = stream; - if (FastAes.IsSupport()) + if (FastAes.IsSupported()) FastAes = new FastAes(key); else { diff --git a/MinecraftClient/Crypto/AesContext.cs b/MinecraftClient/Crypto/FastAes.cs similarity index 98% rename from MinecraftClient/Crypto/AesContext.cs rename to MinecraftClient/Crypto/FastAes.cs index fb6fd7bc..41de7d54 100644 --- a/MinecraftClient/Crypto/AesContext.cs +++ b/MinecraftClient/Crypto/FastAes.cs @@ -21,7 +21,7 @@ namespace MinecraftClient.Crypto /// Detects if the required instruction set is supported /// /// Is it supported - public static bool IsSupport() + public static bool IsSupported() { return Sse2.IsSupported && Aes.IsSupported; } diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 2d68fda1..3de1909e 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -1120,8 +1120,9 @@ namespace MinecraftClient.Protocol.Handlers { forced = dataTypes.ReadNextBool(packetData); string forcedMessage = ChatParser.ParseText(dataTypes.ReadNextString(packetData)); - dataTypes.ReadNextBool(packetData); // Has Prompt Message (Boolean) - 1.17 and above - dataTypes.ReadNextString(packetData); // Prompt Message (Optional Chat) - 1.17 and above + bool hasPromptMessage = dataTypes.ReadNextBool(packetData); // Has Prompt Message (Boolean) - 1.17 and above + if (hasPromptMessage) + dataTypes.ReadNextString(packetData); // Prompt Message (Optional Chat) - 1.17 and above } // Some server plugins may send invalid resource packs to probe the client and we need to ignore them (issue #1056) if (!url.StartsWith("http") && hash.Length != 40) // Some server may have null hash value