This commit is contained in:
BruceChen 2023-01-16 04:04:56 +08:00
parent 950d9bcfdc
commit 30e95f2d23
4 changed files with 13 additions and 4 deletions

View file

@ -104,9 +104,6 @@ namespace MinecraftClient.Protocol.Handlers.packet.s2c
private static void CollectSignArguments(int NodeIdx, string command, List<Tuple<string, string>> arguments)
{
if (Nodes.Length <= NodeIdx)
return;
CommandNode node = Nodes[NodeIdx];
string last_arg = command;
switch (node.Flags & 0x03)

View file

@ -466,7 +466,10 @@ namespace MinecraftClient.Protocol.Handlers
break;
case PacketTypesIn.DeclareCommands:
if (protocolVersion >= MC_1_19_Version)
{
DeclareCommands.Read(dataTypes, packetData, protocolVersion);
handler.OnDeclareCommands();
}
break;
case PacketTypesIn.ChatMessage:
int messageType = 0;

View file

@ -466,6 +466,8 @@ namespace MinecraftClient.Protocol
/// <param name="result">All commands.</param>
public void OnAutoCompleteDone(int transactionId, string[] result);
public void OnDeclareCommands();
/// <summary>
/// Send a click container button packet to the server.
/// Used for Enchanting table, Lectern, stone cutter and loom