public class Species extends java.lang.Object implements ITranslatable, java.lang.Comparable<Species>
Modifier and Type | Field and Description |
---|---|
static com.google.gson.Gson |
GSON |
Constructor and Description |
---|
Species(java.lang.String name,
java.lang.String translationKey,
int dex,
int generation,
java.util.Collection<java.lang.String> defaultForms,
java.util.Collection<Stats> forms,
java.lang.String json)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Species species) |
void |
decode(net.minecraft.network.PacketBuffer buf) |
void |
encode(net.minecraft.network.PacketBuffer buf) |
boolean |
equals(java.lang.Object o) |
Stats |
getDefaultForm()
Gets a
Stats for a random default form of the Pokémon |
Stats |
getDefaultFormExcluding(java.lang.String... forms)
Gets a
Stats for a random default form of the Pokémon |
java.util.List<java.lang.String> |
getDefaultFormNames()
Gets the name of the default form
|
java.util.List<Stats> |
getDefaultForms()
Gets the name of the default form
|
net.minecraft.util.text.TranslationTextComponent |
getDescTranslation() |
java.lang.String |
getDescTranslationKey() |
int |
getDex()
Gets the national Pokédex number for the pokemon
|
Stats |
getFirstForm()
Gets the
Stats for the first default form of the Pokémon |
PaletteProperties |
getFirstPaletteProperties()
Gets the
Stats for the first default form of the Pokémon |
Stats |
getForm(java.lang.String formName)
Gets the form of the species from the given name.
|
java.lang.String |
getFormattedDex()
Gets the formatted national dex number (i.e.
|
java.util.List<Stats> |
getForms()
Gets the list of all potential forms of the Pokémon
|
java.util.List<Stats> |
getForms(boolean temporary)
Gets all the forms of a species excluding, or including, temporary forms
|
java.util.List<Stats> |
getForms(java.util.function.Predicate<Stats> predicate)
Gets forms that match the given predicate
|
java.util.List<Stats> |
getForms(java.lang.String... tags) |
int |
getGeneration()
Gets the Pokémon's generation
|
java.lang.String |
getJson() |
java.lang.String |
getName()
Gets the English name for the Pokémon
|
net.minecraft.util.text.TranslationTextComponent |
getNameTranslation() |
java.lang.String |
getNameTranslationKey() |
RegistryValue<Species> |
getRegistryValue()
Gets the registry value for this species
|
java.lang.String |
getStrippedName()
Gets the English name for the Pokémon with no spaces, hyphens, or other special characters.
|
java.lang.String |
getTranslationKey() |
boolean |
hasFlaggedForm(boolean temporary,
java.lang.String... flags)
Checks if any of the forms of the species contain the given flags
|
boolean |
hasForm(java.lang.String form)
Checks if the
Species has a form |
boolean |
hasFormWithType(Element type)
Checks if any of the forms of the species contain the type specified
|
int |
hashCode() |
boolean |
is(java.util.Optional<Species>... species)
Checks if any of the species registry objects provided in the array are equal to this species (checks by national dex number)
|
boolean |
is(RegistryValue<Species>... species) |
boolean |
is(Species... species)
Checks if any of the species provided in the array are equal to this species (checks by national dex number)
|
boolean |
isDefaultForm(Stats form) |
boolean |
isDefaultForm(java.lang.String form) |
boolean |
isLegendary()
Checks if this species is legendary
|
boolean |
isMythical()
Checks if this species is mythical
|
boolean |
isUltraBeast()
Checks if this species is ultrabeast
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getLocalizedName, getTranslatedName
public Species(java.lang.String name, java.lang.String translationKey, int dex, int generation, java.util.Collection<java.lang.String> defaultForms, java.util.Collection<Stats> forms, java.lang.String json)
name
- The English name of the species.dex
- The national Pokédex number.defaultForms
- The Pokémon's default forms.forms
- All potential forms of the Pokémon.public java.lang.String getName()
public java.lang.String getStrippedName()
public int getDex()
public java.lang.String getFormattedDex()
public RegistryValue<Species> getRegistryValue()
public java.util.List<java.lang.String> getDefaultFormNames()
public boolean isDefaultForm(java.lang.String form)
public boolean isDefaultForm(Stats form)
public java.util.List<Stats> getDefaultForms()
public Stats getDefaultForm()
Stats
for a random default form of the Pokémonpublic Stats getFirstForm()
Stats
for the first default form of the Pokémonpublic Stats getDefaultFormExcluding(java.lang.String... forms)
Stats
for a random default form of the Pokémonpublic java.util.List<Stats> getForms()
public Stats getForm(java.lang.String formName)
formName
- The name of the formpublic java.util.List<Stats> getForms(boolean temporary)
temporary
- If temporary forms should be includedpublic java.util.List<Stats> getForms(java.lang.String... tags)
public boolean hasFlaggedForm(boolean temporary, java.lang.String... flags)
temporary
- If it should also include temporary forms in the searchflags
- The flags to search forpublic boolean hasFormWithType(Element type)
type
- The type to search againstpublic java.util.List<Stats> getForms(java.util.function.Predicate<Stats> predicate)
predicate
- The test casepublic PaletteProperties getFirstPaletteProperties()
Stats
for the first default form of the Pokémonpublic int getGeneration()
public java.lang.String getTranslationKey()
getTranslationKey
in interface ITranslatable
public java.lang.String getNameTranslationKey()
public java.lang.String getDescTranslationKey()
public net.minecraft.util.text.TranslationTextComponent getNameTranslation()
public net.minecraft.util.text.TranslationTextComponent getDescTranslation()
public boolean is(Species... species)
species
- The species to check@SafeVarargs public final boolean is(java.util.Optional<Species>... species)
species
- The species to check@SafeVarargs public final boolean is(RegistryValue<Species>... species)
public boolean hasForm(java.lang.String form)
Species
has a formpublic boolean isLegendary()
public boolean isUltraBeast()
public boolean isMythical()
public void decode(net.minecraft.network.PacketBuffer buf)
public void encode(net.minecraft.network.PacketBuffer buf)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getJson()
public int compareTo(Species species)
compareTo
in interface java.lang.Comparable<Species>
public java.lang.String toString()
toString
in class java.lang.Object