Command Data

From Minecraft 1.13, the Command Graph data structure defines commands which can be used in chat or in command blocks, and how they're parsed.

Graph Structure
The graph consists of nodes of type,   and. A node may point to a number child nodes, or redirect to another node, or neither. The root node is nameless, and its children are literal nodes for familiar commands ("msg", "me", etc).

Nodes are marked as executable if the node stack to this point constitutes a valid command. E.g. this is false for  but true for   and.

When including redirects, this structure is a directed graph that may include cycles (e.g. consider ). When excluding redirects, the structure no longer contains cycles but may still not be a tree, as a node may have multiple parents.

Parsers
Clients are expected to implement all parsers, including properties (if any). If an unknown parser is encountered by a client, unpacking of the Declare Commands  packet should stop immediately, as the structure of the remainder of the packet cannot be guessed.

Specifies min and max values.

Specifies min and max values.

Specifies min and max values.

A VarInt enum.

Has a single flags byte.

Has a single flags byte:

A range of values with a min and a max.