Class RandomSpeciesRequirement
java.lang.Object
com.pixelmonmod.api.pokemon.requirement.impl.RandomSpeciesRequirement
- All Implemented Interfaces:
Requirement<Pokemon,PixelmonEntity, PokemonSpecification>
public class RandomSpeciesRequirement
extends Object
implements Requirement<Pokemon,PixelmonEntity,PokemonSpecification>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies the parsed requirement to the datavoidapplyMinecraft(PixelmonEntity pixelmonEntity) Applis the parsed requirement to the minecraft dataCreates a list of requirements from the spec being parsedCreates a new instance of the requirement with the given valuebooleanChecks if the given fits for this requirementThe aliases of the requirement that it can match againstintGets the order priority of the requirement.getValue()Gets the internal value of the requirementbooleanisDataMatch(Pokemon pixelmon) If the data type matches the parsed requirementbooleanisMinecraftMatch(PixelmonEntity entity) If the minecraft type matches the parsed requirementbooleanIf the spec should continue processing the results after applying this requirement.
-
Field Details
-
spec
-
-
Constructor Details
-
RandomSpeciesRequirement
public RandomSpeciesRequirement() -
RandomSpeciesRequirement
-
-
Method Details
-
createInstance
public ParseAttempt<Requirement<Pokemon,PixelmonEntity, createInstancePokemonSpecification>> (PokemonSpecification value) Description copied from interface:RequirementCreates a new instance of the requirement with the given value- Specified by:
createInstancein interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
value- The value- Returns:
- The new requirement instance
-
getPriority
public int getPriority()Description copied from interface:RequirementGets the order priority of the requirement. Higher number = higher priority (i.e. it is applied first)- Specified by:
getPriorityin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Returns:
- The priority
-
shouldContinue
public boolean shouldContinue()Description copied from interface:RequirementIf the spec should continue processing the results after applying this requirement.
For example, for a logical AND this would return false as it handles the processing of the remaining requirements- Specified by:
shouldContinuein interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Returns:
- True if it should continue processing
-
getAliases
Description copied from interface:RequirementThe aliases of the requirement that it can match against- Specified by:
getAliasesin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Returns:
- The aliases
-
fits
Description copied from interface:RequirementChecks if the given fits for this requirement- Specified by:
fitsin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
spec- The parsed spec- Returns:
- True if this requirement is found in the parameter
-
create
Description copied from interface:RequirementCreates a list of requirements from the spec being parsed- Specified by:
createin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
spec- The spec being parsed- Returns:
- The new list of requirements
-
isMinecraftMatch
Description copied from interface:RequirementIf the minecraft type matches the parsed requirement- Specified by:
isMinecraftMatchin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
entity- The minecraft data to check against- Returns:
- True if a match
-
isDataMatch
Description copied from interface:RequirementIf the data type matches the parsed requirement- Specified by:
isDataMatchin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
pixelmon- The data to check against- Returns:
- True if a match
-
applyMinecraft
Description copied from interface:RequirementApplis the parsed requirement to the minecraft data- Specified by:
applyMinecraftin interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
pixelmonEntity- The minecraft data
-
getValue
Description copied from interface:RequirementGets the internal value of the requirement- Specified by:
getValuein interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Returns:
- The value stored
-
applyData
Description copied from interface:RequirementApplies the parsed requirement to the data- Specified by:
applyDatain interfaceRequirement<Pokemon,PixelmonEntity, PokemonSpecification> - Parameters:
pokemon- The data
-