java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.Stats
All Implemented Interfaces:
ITranslatable, Cloneable

public class Stats extends Object implements ITranslatable, Cloneable
  • Field Details

    • name

      protected String name
    • translationKey

      protected String translationKey
    • experienceGroup

      protected ExperienceGroup experienceGroup
    • dimensions

      protected Dimensions dimensions
    • moves

      protected Moves moves
    • abilities

      protected Abilities abilities
    • movement

      protected Movement movement
    • aggression

      protected AggressionChances aggression
    • battleStats

      protected ImmutableBattleStats battleStats
    • tags

      protected FormTags tags
    • spawn

      protected SpawnData spawn
    • evYields

      protected EVYields evYields
    • possibleGenders

      protected com.google.common.collect.ImmutableList<Gender> possibleGenders
    • genderProperties

      protected com.google.common.collect.ImmutableList<GenderProperties> genderProperties
    • eggGroups

      protected com.google.common.collect.ImmutableList<EggGroup> eggGroups
    • types

      protected com.google.common.collect.ImmutableList<Element> types
    • evolutions

      protected com.google.common.collect.ImmutableList<Evolution> evolutions
    • preEvolutions

      protected com.google.common.collect.ImmutableList<RegistryValue<Species>> preEvolutions
    • defaultBaseForm

      protected String defaultBaseForm
    • megaItems

      protected com.google.common.collect.ImmutableList<String> megaItems
    • megas

      protected com.google.common.collect.ImmutableList<String> megas
    • gigantamax

      protected Gigantamax gigantamax
    • eggCycles

      protected int eggCycles
    • weight

      protected float weight
    • catchRate

      protected int catchRate
    • malePercentage

      protected float malePercentage
    • minLevel

      public transient int minLevel
      The minimum pokemonLevel this Pokémon can be without being more suitable as a pre-evolution.
    • maxLevel

      public transient int maxLevel
      The maximum pokemonLevel this Pokémon can be before it would be expected to have evolved.
  • Constructor Details

    • Stats

      public Stats()
  • Method Details

    • clone

      public Stats clone()
      Overrides:
      clone in class Object
    • getName

      public String getName()
      Gets the name of the form
      Returns:
      The name
    • isForm

      public boolean isForm(String... forms)
    • getGenderProperties

      public GenderProperties getGenderProperties(Gender gender)
      Gets the gender properties for the given gender
      Parameters:
      gender - The gender searching for
      Returns:
      The gender properties
    • getPossibleGenders

      public List<Gender> getPossibleGenders()
      Gets all possible Genders this form can take
      Returns:
      A copy of the array of all possible genders
    • isPossibleGender

      public boolean isPossibleGender(Gender gender)
      Checks if this form can take the given gender
      Parameters:
      gender - The gender being checked
      Returns:
      True if it can be this gender
    • isTemporary

      public boolean isTemporary()
      If the form is temporary for battles only
      Returns:
      True if it is temporary and should be reverted at the end of battle
    • getBattleStats

      public ImmutableBattleStats getBattleStats()
      Gets the form's default, immutable, battle stats
      Returns:
      The battle stats
    • getExperienceGroup

      public ExperienceGroup getExperienceGroup()
      Gets the experience group
      Returns:
      The experience group
    • calculateMinMaxLevels

      public void calculateMinMaxLevels()
    • getHighestFeasibleLevel

      public int getHighestFeasibleLevel()
    • getMoves

      public Moves getMoves()
      Gets the moves
      Returns:
      The moves
    • getTags

      public FormTags getTags()
      Gets the tags for the form
      Returns:
      The tags
    • getTypes

      public List<Element> getTypes()
      Returns the types of a form
      Returns:
      Type list
    • hasType

      public boolean hasType(Element... types)
      Returns if the form has the type(s)
      Returns:
      yes/no
    • getGigantamax

      public Gigantamax getGigantamax()
      Get the gigantamax object
      Returns:
      The gigantamax object
    • hasMegaForm

      public boolean hasMegaForm()
      Checks if the form has a mega form
      Returns:
      True if it can mega evolve
    • hasGigantamaxForm

      public boolean hasGigantamaxForm()
      Checks if the form has a gigantamax form
      Returns:
      True if it can gigantamax
    • getMegaItems

      public List<net.minecraft.world.item.Item> getMegaItems()
      Gets the mega items for this form
      Returns:
      The mega items
    • getMegaForm

      public Optional<Stats> getMegaForm(net.minecraft.world.item.Item item)
      Gets the mega form for a mega item, if available
      Returns:
      Optional mega form
    • getMegaForms

      public List<Stats> getMegaForms()
      Gets all potential mega evolutions
      Returns:
      List of potential mega evolutions for this form
    • getGigantamaxForm

      public Optional<Stats> getGigantamaxForm()
      Gets the gigantamax form, if available
      Returns:
      Optional gigantamax form
    • getRandomMegaForm

      public Stats getRandomMegaForm()
      Selects a random mega form
      Returns:
      A random mega form
    • getDimensions

      public Dimensions getDimensions()
      Gets the dimensions of this form.
      Returns:
      The dimensions object
    • getAbilities

      public Abilities getAbilities()
      Gets the abilities
      Returns:
      The pokemon's abilities
    • getWeight

      public float getWeight()
      Gets the weight of the pokemon
      Returns:
      The weight
    • getEggGroups

      public List<EggGroup> getEggGroups()
      Gets an immutable list of the EggGroup of this form
      Returns:
      The egg groups
    • getTranslationKey

      public String getTranslationKey()
      Gets the form name translation key of the pokemon
      Specified by:
      getTranslationKey in interface ITranslatable
      Returns:
      The form translation key
    • getLocalizedName

      public String getLocalizedName()
      Specified by:
      getLocalizedName in interface ITranslatable
    • getTranslatedName

      public net.minecraft.network.chat.MutableComponent getTranslatedName()
      Description copied from interface: ITranslatable
      Returns the translation component of the objects name.
      Specified by:
      getTranslatedName in interface ITranslatable
      Returns:
      The translation component.
    • setParentSpecies

      protected void setParentSpecies(Species parent)
    • getParentSpecies

      public Species getParentSpecies()
      Gets the parent species
      Returns:
    • is

      public boolean is(String... names)
      Checks if the form names are equal to this form
      Parameters:
      names - The names of forms
      Returns:
      True if a match
    • is

      public boolean is(Stats... forms)
      Checks if the forms are equal to this
      Parameters:
      forms - The forms to check
      Returns:
      True if a match is found
    • is

      public boolean is(boolean speciesEquality, Stats... forms)
      Checks if the forms are equal to this
      Parameters:
      speciesEquality - The parent species have to be equal for them to match
      forms - The forms being checked
      Returns:
      True if a match is found
    • getEvolutions

      public List<Evolution> getEvolutions()
    • getFirstEvolutionConditionOfType

      public <T extends EvoCondition> Optional<T> getFirstEvolutionConditionOfType(Class<T> type)
    • registerModels

      public void registerModels()
    • isDefault

      public boolean isDefault()
    • getMovement

      public Movement getMovement()
      Gets the Movement settings of the form
      Returns:
      The movement settings
    • getAggression

      public AggressionChances getAggression()
      Gets the AggressionChances of the form
      Returns:
      The aggression chances
    • getSpawn

      public SpawnData getSpawn()
      Gets the spawn data of the form
      Returns:
      Spawn data
    • getEggCycles

      public int getEggCycles()
      Gets the egg cycles of the form
      Returns:
      Egg cycles
    • getHoverHeight

      public float getHoverHeight()
      Gets the height above the ground the form hovers
      Returns:
      The hover height
    • getCatchRate

      public int getCatchRate()
      Gets the catch rate of the form
      Returns:
      Catch rate
    • getMalePercentage

      public float getMalePercentage()
      Gets the percentage chance of the form being a Gender.MALE
      Returns:
      The chance (from 0 to 1) of it being a male
    • isFemaleOnly

      public boolean isFemaleOnly()
      Checks if the form can only ever be a Gender.FEMALE
      Returns:
      True if only females can exist
    • isMaleOnly

      public boolean isMaleOnly()
      Checks if a form can only ever be a Gender.MALE
      Returns:
      True if only males can exist
    • isGenderless

      public boolean isGenderless()
      If the only gender is Gender.NONE
      Returns:
      True if the form is genderless
    • getDefaultBaseForm

      public String getDefaultBaseForm()
    • getEVYields

      public EVYields getEVYields()
      Returns a copy of this form's ev yields
      Returns:
      The ev yields
    • getDefaultGender

      public Gender getDefaultGender()
    • getDefaultGenderProperties

      public GenderProperties getDefaultGenderProperties()
    • getFirstGender

      public Gender getFirstGender()
    • getFirstGenderProperties

      public GenderProperties getFirstGenderProperties()
    • getGenderProperties

      public List<GenderProperties> getGenderProperties()
    • getBaseEvolution

      public Species getBaseEvolution()
      Gets the base species of the Pokemon
      Returns:
      The base species
    • getPreEvolutions

      public List<Species> getPreEvolutions()
      Gets the form's pre-evolutions (i.e. the evolutions that can lead to this form)
      Returns:
      The pre-evolutions
    • isRegional

      public boolean isRegional()
      Checks if the form is alolan or galarian
      Returns:
      If the form comes form a region
    • isGalarian

      public boolean isGalarian()
      Checks if the form is galarian Short cut for {@link this#getTags()#isGalarian()} and Tags.GALARIAN
      Returns:
      True if is a galarian
    • isAlolan

      public boolean isAlolan()
      Checks if the form is alolan Short cut for {@link this#getTags()#isAlolan()} and Tags.ALOLAN
      Returns:
      True if is an alolan
    • isHisuian

      public boolean isHisuian()
      Checks if the form is hisuian Short cut for {@link this#getTags()#isHisuian()} ()} and Tags.HISUIAN
      Returns:
      True if is a hisuian
    • isPaldean

      public boolean isPaldean()
      Checks if the form is paldean Short cut for {@link this#getTags()#isPaldean()} ()} ()} and Tags.PALDEAN
      Returns:
      True if is a paldean
    • getRegionalTag

      public String getRegionalTag()
      Gets the regional tag if it exists Short cut for {@link this#getTags()#getRegionalTag()}
      Returns:
      String if is regional, null if not
    • hasTag

      public boolean hasTag(String... tags)
      A logical OR for if the form has any of the tags
      Parameters:
      tags - The tags to check
      Returns:
      If any apply to this form
    • hasChild

      public boolean hasChild(Species species)
      Checks if the Pokemon has a child of the given species
      Parameters:
      species - The child species being checked
      Returns:
      True if one of the pre-evolutions is the same species as the child