Implemented new Delcare Command packet for new versions 1.20.6-1.21.11 and fixed it for 1.20.4.

This commit is contained in:
Anon 2026-03-22 00:42:43 +01:00
parent b4e69da81f
commit e2746ae0d1
4 changed files with 804 additions and 666 deletions

File diff suppressed because it is too large Load diff

View file

@ -3702,8 +3702,13 @@ namespace MinecraftClient.Protocol.Handlers
try
{
List<Tuple<string, string>>? needSigned = null;
bool canSignCommand = protocolVersion >= MC_1_19_Version &&
isOnlineMode &&
playerKeyPair != null &&
Config.Signature.LoginWithSecureProfile &&
Config.Signature.SignMessageInCommand;
if (protocolVersion >= MC_1_19_Version && Config.Signature is { LoginWithSecureProfile: true, SignMessageInCommand: true })
if (canSignCommand)
{
if (DeclareCommands.IsCommandTreeAvailable)
{