MCPBot Help

MCPBot_Reborn is used to query and update information on classes, fields, methods, and method parameters in Minecraft and can be accessed through EsperNet in the official MCP channels (#mcp, #mcp-modding, #mcpbot). The bot can be used to get or set name and comment information for methods/fields/method params in the current release of MCP and can be used to query data from MCP versions 7.44 and above.

General Use

There are three main ways to send commands to the bot in order of preference:

  • In a DCC chat with MCPBot_Reborn. You will need to use the dcc command to access this. Please use this whenever possible so that MCPBot_Reborn can remain responsive and produce instant results. Note that DCC is not supported over IPv6!
  • In private message with MCPBot_Reborn.
  • In a channel with MCPBot_Reborn. You will need to prefix the command with !

Note: SRG names can be abbreviated from their SRG name 'func_200_a' to just '200' with most commands.

gf, gm, gp, gc : Get information on a given member. M for methods, F for fields, P for params, and C for classes (ie : gf => Get Field). It is possible to reference the searched member by notch name (a, b, etc), SRG name (func_200_b, field_200_c, etc), index (the numerical part of SRG name) or full name.

  Usage  : gf [<class>.]<name> [<version>]
  Example: gf field_200_a
  Example: gm Block.func_200_b
  Example: gm Block.func_200_b 1.7.2

sf, sm, sp : Set information for a member. The member name MUST be expressed either in SRG notation or index. Please use camelCase and start method names with a verb. Adding a description to every name is very important as well. And please don't rename anything that doesn't have the default SRG name, it breaks people's mods.

  Usage  : sf <searge name or index> <new name> [description]
  Example: sf 200 foobar This is a foobar field
  Example: sm func_200_a foobar This is what the field is used for

Method Javadocs

One thing that's always been lacking in the decompiled code is proper method Javadocs. Here's how you can help fix that:

  1. Always give methods a description when naming them. This description should only describe what the method does and doesn't need to worry about parameters. The @param portion of the method comment is added by providing a comment when naming parameters.
  2. Always name the parameters for methods that have them. This makes code comprehension much easier.
  3. Always give parameters a comment. This allows us to build the Javadocs for methods automatically when exporting the CSV files.

Example:

Executing these commands:

  sm func_177967_a offset Offsets this BlockPos n blocks in the given direction
  sp p_177967_1_ facing The direction of the offset
  sp p_177967_2_ n The number of blocks to offset by

will produce:

  /**
   * Offsets this BlockPos n blocks in the given direction
   *
   * @param facing The direction of the offset
   * @param n The number of blocks to offset by
   */

Other Notes: (applies to fields as well)

  • Comments can contain "\n" to insert hard breaks. If you want a blank line to appear between paragraphs in a long description, use "\n \n" (note the space between the breaks).
  • Good comments can help keep method names short and sweet. If a method is called "get", a good comment will tell you if the method is returning a static instance of the object, the "value" of the object, or some other thing.
  • Every time you name a method without adding a comment, Cthulhu kills a kitten. Please, think of the kittens.

Full Command List

Command Params Description
General Commands
help [<command>|*] Lists available commands or help about a specific command.
more [clear] Gets the next 10 queued command results. Commands that can queue results will tell you so.
dcc N/A Requests a DCC connection to the bot.
version N/A Gets info about the current version.
versions N/A Gets info about versions that are available in the database.
exports N/A Shows a link to the bot data export site.
testcsv N/A Shows the same link as exports, but also shows the time since the last export.
Member Get Commands
gc <class> [<version>] Returns class information. Defaults to current version. Version can be for MCP or MC.
gf [<class>.]<name> [<version>] Returns field information. Defaults to current version. Version can be for MCP or MC.
gm [<class>.]<name> [<version>] Returns method information. Defaults to current version. Version can be for MCP or MC.
gp [[<class>.]<method>.]<name> [<version>] Returns method parameter information. Defaults to current version. Version can be for MCP or MC. Obf class and method names not supported.
uf <class> Returns a list of unnamed fields for a given class. Use DCC if the list is long.
um <class> Returns a list of unnamed methods for a given class. Use DCC if the list is long.
up <class> Returns a list of unnamed method parameters for a given class. Use DCC if the list is long.
Member Set Commands
sf <srg name> <new name> [<comment>] Sets the MCP name and comment for the SRG field specified. SRG index can also be used.
sm <srg name> <new name> [<comment>] Sets the MCP name and comment for the SRG method specified. SRG index can also be used.
sp <srg name> <new name> [<comment>] Sets the MCP name and comment for the SRG method parameter specified. SRG index can also be used.
undo <srg name> Undoes the last *STAGED* name change to a given method/field/param. By default you can only undo your own changes.
redo <srg name> Redoes the last *UNDONE* staged change to a given method/field/param. By default you can only redo your own changes.
Search Commands
find <regex pattern> [<version>] Returns any entries matching a regex pattern. Only returns complete matches.
findc <regex pattern> [<version>] Returns class entries matching a regex pattern. Only returns complete matches.
findf <regex pattern> [<version>] Returns field entries matching a regex pattern. Only returns complete matches.
findm <regex pattern> [<version>] Returns method entries matching a regex pattern. Only returns complete matches.
findp <regex pattern> [<version>] Returns parameter entries matching a regex pattern. Only returns complete matches.
findall <regex pattern> [<version>] Returns any entries matching a regex pattern. Allows partial matches to be returned.
findallc <regex pattern> [<version>] Returns class entries matching a regex pattern. Allows partial matches to be returned.
findallf <regex pattern> [<version>] Returns field entries matching a regex pattern. Allows partial matches to be returned.
findallm <regex pattern> [<version>] Returns method entries matching a regex pattern. Allows partial matches to be returned.
findallp <regex pattern> [<version>] Returns parameter entries matching a regex pattern. Allows partial matches to be returned.

© 2017 MCP Team

Designed using Bootswatch via BootstrapCDN. MCP logo by Dustin Christensen

Page accessed 2017-06-24 11:23:55 EDT