Class AbstractPokemonRequirement<A>

java.lang.Object
com.pixelmonmod.api.requirement.AbstractRequirement<Pokemon,PixelmonEntity,A>
com.pixelmonmod.api.pokemon.requirement.AbstractPokemonRequirement<A>
Type Parameters:
A - The data type
All Implemented Interfaces:
Requirement<Pokemon,PixelmonEntity,A>
Direct Known Subclasses:
AbilityRequirement, AbstractBooleanPokemonRequirement, AbstractDoublePokemonRequirement, AbstractIntegerPokemonRequirement, AbstractStringPokemonRequirement, AIRequirement, BossRequirement, GenderRequirement, GenericBuiltPokemonRequirement, GrowthRequirement, HeldItemRequirement, NatureRequirement, PokeBallRequirement, PokerusRequirement, RibbonRequirement, SpeciesRequirement

public abstract class AbstractPokemonRequirement<A> extends AbstractRequirement<Pokemon,PixelmonEntity,A>
Basic abstract implementation for specs following the format :
  • Constructor Details

    • AbstractPokemonRequirement

      public AbstractPokemonRequirement(Set<String> keys)
  • Method Details

    • create

      public abstract ParseAttempt<List<Requirement<Pokemon,PixelmonEntity,?>>> create(String key, String spec)
      Description copied from class: AbstractRequirement
      Attempts to parse the spec with the key that was found in the spec string
      Specified by:
      create in class AbstractRequirement<Pokemon,PixelmonEntity,A>
      Parameters:
      key - The key found
      spec - The spec being parsed
      Returns:
      The parse attempt
    • applyMinecraft

      public void applyMinecraft(PixelmonEntity entityPixelmon)
      Description copied from interface: Requirement
      Applis the parsed requirement to the minecraft data
      Parameters:
      entityPixelmon - The minecraft data
    • isMinecraftMatch

      public boolean isMinecraftMatch(PixelmonEntity entityPixelmon)
      Description copied from interface: Requirement
      If the minecraft type matches the parsed requirement
      Parameters:
      entityPixelmon - The minecraft data to check against
      Returns:
      True if a match