Skip to content

Instantly share code, notes, and snippets.

@airbreather
Last active January 1, 2016 15:09
Show Gist options
  • Save airbreather/8162521 to your computer and use it in GitHub Desktop.
Save airbreather/8162521 to your computer and use it in GitHub Desktop.
An ad-hoc list of MCP Mappings I came up with that MCPBot didn't know about at the time
field_150267_b = "text"
field_150276_d = "key"
field_150277_e = "formatArgs"
field_150274_f = "syncLock"
field_150275_g = "lastTranslationUpdateTimeInMilliseconds"
field_150279_c = "stringVariablePattern"
field_150278_b = "children" // The discrete elements that make up this component.
For example, if the key is "translation.test.complex", args are ["FirstArg", "SecondArg", "ThirdArg"], and the current translator has an entry like:
translation.test.complex=Prefix, %s%2$s again %s and %1$s lastly %s and also %1$s again!
Then the children would look like: ["Prefix, ", "FirstArg", "SecondArg", " again ", "SecondArg", " and ", "FirstArg", " lastly ", "ThirdArg", " and also ", "FirstArg", " again!"].
Put it all together and the text looks like "Prefix, FirstArgSecondArg again SecondArg and FirstArg lastly ThirdArg and also FirstArg again!".
func_150270_g = "ensureInitialized" // ensures that our children are initialized from the most recent string translation mapping.
func_150269_b = "initializeFromFormat" // initializes our children from a format string, using the format args to fill in the placeholder variables.
func_150272_a = "getFormatArgumentAsComponent"
func_150268_i = "getKey"
func_150271_j = "getFormatArgs"
func_150265_g = "getChatComponentText_TextValue" // Gets the text value of this ChatComponentText. TODO: what are getUnformattedText and getUnformattedText missing that made someone decide to create a third equivalent method that only ChatComponentText can implement?
func_82366_d = "getActiveGameRules"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment