Class AbstractEggGroup

java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.egg.impl.AbstractEggGroup
All Implemented Interfaces:
EggGroup, ITranslatable
Direct Known Subclasses:
BasicEggGroup

public abstract class AbstractEggGroup extends Object implements EggGroup
Basic abstract implementation of the EggGroup
Since:
24/06/2022
  • Field Details

    • index

      protected final int index
    • name

      protected final String name
  • Constructor Details

    • AbstractEggGroup

      protected AbstractEggGroup(int index, String name)
  • Method Details

    • getIndex

      public int getIndex()
      Description copied from interface: EggGroup
      Gets the index of the egg group from the game's index
      Specified by:
      getIndex in interface EggGroup
      Returns:
      The game index
    • getKey

      public String getKey()
      Description copied from interface: EggGroup
      Gets the unique identifying key of the egg
      Specified by:
      getKey in interface EggGroup
      Returns:
      The identifying key
    • canBreed

      public boolean canBreed(Gender first, Gender second)
      Description copied from interface: EggGroup
      Checks if the two Gender
      Specified by:
      canBreed in interface EggGroup
      Parameters:
      first - The first gender
      second - The second gender
      Returns:
      True if they can breed
    • canBreedWith

      public boolean canBreedWith(List<EggGroup> others)
      Description copied from interface: EggGroup
      Checks if this egg group can breed with any of the given other egg groups Will return true if a single one works
      Specified by:
      canBreedWith in interface EggGroup
      Parameters:
      others - The egg groups being checked
      Returns:
      True if it works
    • canBreedWith

      public boolean canBreedWith(EggGroup... others)
      Description copied from interface: EggGroup
      Checks if this egg group can breed with any of the given other egg groups Will return true if a single one works
      Specified by:
      canBreedWith in interface EggGroup
      Parameters:
      others - The egg groups being checked
      Returns:
      True if it works
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface ITranslatable