Class ShowdownConverter
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.export.impl.ShowdownConverter
- All Implemented Interfaces:
PokemonConverterProxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final char
static final String
static final String
static final String
static final String
static final char
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAllColonSeparatedValues
(Pokemon data, StringBuilder exportText) Adds most of the Pokémon's info to the StringBuilder.static void
addAllColorfulColonSeparatedValues
(Pokemon data, StringBuilder exportText) Adds most of the Pokémon's info to the StringBuilder, adding extra color to make it pretty.static void
addColonSeparated
(StringBuilder builder, String label, Object value) Separates a label and a value by a colon, and inserts a newline afterwards.static void
addColorfulColonSeparated
(StringBuilder builder, String label, Object value) Separates a label and a value by a colon, and inserts a newline afterwards, with extra colors.getColorfulExportText
(Pokemon data) Gets exportable text for the Pokémon, but colorful!getExportText
(Pokemon data) Gets exportable text for the Pokémon.int
getIntAfterColon
(String string) Gets the part of a string that is after a colon, converted to an integer.getStringAfterColon
(String string) Gets the part of a string that is after a colon.importText
(String importText) Parses import text and saves it to the Pokémon.importText
(String... importText) Imports formatted text to a Pokemon instancestatic void
setColorfulPokePasteGender
(Pokemon data, StringBuilder exportText) Adds the Pokémon's gender to the StringBuilder, adding extra color to make it pretty.static void
setColorfulPokePasteHeldItem
(Pokemon data, StringBuilder exportText) Adds the Pokémon's held item to the StringBuilder, but with potentially extra color.static void
setColorfulPokePasteMoves
(Pokemon data, StringJoiner stringJoiner) Adds the Pokémon's moves to the StringBuilder, but with extra color.static String
setPokePasteFormAndPalette
(Pokemon data, String exportName) Sets the Pokémon's form name and palette name that appear on the first line of Pokémon's PokéPaste.static void
setPokePasteGender
(Pokemon data, StringBuilder exportText) Adds the Pokémon's gender to the StringBuilder.static void
setPokePasteHeldItem
(Pokemon data, StringBuilder exportText) Adds the Pokémon's held item to the StringBuilder.static void
setPokePasteMoves
(Pokemon data, StringJoiner stringJoiner) Adds the Pokémon's moves to the StringBuilder.static void
setPokePasteNickname
(Pokemon data, StringBuilder exportText, String exportName) Sets the Pokémon's nickname that appears on the first line of Pokémon's PokéPaste.static String
setPokePastePokemonNameColorful
(Pokemon data, String exportName) Sets the Pokémon's name (including its form and palette) as the color of the Pokémon's primary type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.pokemon.export.PokemonConverterProxy
getExportText, getExportText, getExportText, getFormattedExportedText, getFormattedExportedText, getFormattedExportedText, importText
-
Field Details
-
SPECIES_TEXT
- See Also:
-
GENDER_TEXT
- See Also:
-
ABILITY_TEXT
- See Also:
-
LEVEL_TEXT
- See Also:
-
SHINY_TEXT
- See Also:
-
HAPPINESS_TEXT
- See Also:
-
EV_TEXT
- See Also:
-
NATURE_TEXT
- See Also:
-
IV_TEXT
- See Also:
-
POKE_BALL_TEXT
- See Also:
-
SIZE_TEXT
- See Also:
-
CLONES_TEXT
- See Also:
-
RUBY_TEXT
- See Also:
-
MINIOR_CORE_TEXT
- See Also:
-
SMELT_TEXT
- See Also:
-
MOVE_TEXT
- See Also:
-
STAT_TEXT
-
MALE_SYMBOL
public static final char MALE_SYMBOL- See Also:
-
FEMALE_SYMBOL
public static final char FEMALE_SYMBOL- See Also:
-
SHINY_YES
- See Also:
-
SHINY_NO
- See Also:
-
-
Constructor Details
-
ShowdownConverter
public ShowdownConverter()
-
-
Method Details
-
getExportText
Gets exportable text for the Pokémon.- Specified by:
getExportText
in interfacePokemonConverterProxy
- Parameters:
data
- The data object to export from.- Returns:
- Exportable text for the Pokémon.
-
getColorfulExportText
Gets exportable text for the Pokémon, but colorful!- Specified by:
getColorfulExportText
in interfacePokemonConverterProxy
- Parameters:
data
- The data object to export from.- Returns:
- Exportable colorful text for the Pokémon.
-
setPokePasteFormAndPalette
Sets the Pokémon's form name and palette name that appear on the first line of Pokémon's PokéPaste.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportName
- The string that will be edited and returned.- Returns:
- A string with the (previously defined) Pokémon's species, along with its form and palette.
-
setPokePastePokemonNameColorful
Sets the Pokémon's name (including its form and palette) as the color of the Pokémon's primary type.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportName
- The string that will be edited and returned.- Returns:
- A string with the Pokémon's nickname, species, form, and palette, but colorful.
-
setPokePasteNickname
Sets the Pokémon's nickname that appears on the first line of Pokémon's PokéPaste.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.exportName
- The String that contains info on species, form, and palette.
-
setPokePasteGender
Adds the Pokémon's gender to the StringBuilder.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.
-
setColorfulPokePasteGender
Adds the Pokémon's gender to the StringBuilder, adding extra color to make it pretty.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.
-
setPokePasteHeldItem
Adds the Pokémon's held item to the StringBuilder.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.
-
setColorfulPokePasteHeldItem
Adds the Pokémon's held item to the StringBuilder, but with potentially extra color.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.
-
addAllColonSeparatedValues
Adds most of the Pokémon's info to the StringBuilder.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.
-
addAllColorfulColonSeparatedValues
Adds most of the Pokémon's info to the StringBuilder, adding extra color to make it pretty.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.exportText
- The StringBuilder being used to create the text of the PokéPaste.
-
setPokePasteMoves
Adds the Pokémon's moves to the StringBuilder.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.stringJoiner
- The StringJoiner being used to create the text of the PokéPaste.
-
setColorfulPokePasteMoves
Adds the Pokémon's moves to the StringBuilder, but with extra color.- Parameters:
data
- The Pokémon being converted into PokéPaste/Showdown format.stringJoiner
- The StringJoiner being used to create the text of the PokéPaste.
-
addColonSeparated
Separates a label and a value by a colon, and inserts a newline afterwards.- Parameters:
builder
- The string builder to add the colon-separated string to.label
- The label to put before the colon.value
- The value to put after the colon.
-
addColorfulColonSeparated
Separates a label and a value by a colon, and inserts a newline afterwards, with extra colors.- Parameters:
builder
- The string builder to add the colon-separated string to.label
- The label to put before the colon.value
- The value to put after the colon.
-
importText
Description copied from interface:PokemonConverterProxy
Imports formatted text to a Pokemon instance- Specified by:
importText
in interfacePokemonConverterProxy
- Parameters:
importText
- The formatted text- Returns:
- The Pokemon instance
- Throws:
PokemonImportException
- thrown when there's an error with the given text
-
importText
Parses import text and saves it to the Pokémon.- Specified by:
importText
in interfacePokemonConverterProxy
- Parameters:
importText
- The text to save to the Pokémon.- Returns:
- Whether the text was successfully parsed.
- Throws:
ShowdownImportException
-
getIntAfterColon
Gets the part of a string that is after a colon, converted to an integer.- Parameters:
string
- The string to filter.- Returns:
- The part of the string that is after a colon, converted to an integer.
-
getStringAfterColon
Gets the part of a string that is after a colon.- Parameters:
string
- The string to filter.- Returns:
- The part of the string that is after a colon.
-