User:JavaRogers/Understanding Brigadier

This page documents my attempts to analyse and understand the Brigadier system for dispatching commands.

See this pastebin for an excerpt from The Brigadier Git/src/main/java/com/mojang/brigadier/CommandDispatcher.java. These are two (okay, four) commands called by several other "parse then execute" commands.

A command context has:

I'm thinking the above represents a command node, more or less (Can be  or   or  &mdash;Commands and arguments, yeah?).

NOPE! I found an actual command node. I'm not sure what a command context is, but perhaps it's similar.

It seems that when Mojang compiles the game each release, all of Minecraft's non-library classes, functions, variables, etc. lose their original names and are replaced with "a", "b", "c", etc. Wow that's frustrating XD

The  seems to define the  command. All these classes in alphabetical proximity to "sc" look like possible command definitions.
 * The  function seems to register a LiteralCommandNode, figuring out all its arguments.