Class RandomSpeciesRequirement
java.lang.Object
com.pixelmonmod.api.statue.requirement.impl.RandomSpeciesRequirement
- All Implemented Interfaces:
Requirement<Pokemon,
StatueEntity, StatueSpecification>
public class RandomSpeciesRequirement
extends Object
implements Requirement<Pokemon,StatueEntity,StatueSpecification>
-
Field Summary
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the parsed requirement to the datavoid
applyMinecraft
(StatueEntity statue) 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 valueboolean
Checks if the given fits for this requirementThe aliases of the requirement that it can match againstint
Gets the order priority of the requirement.getValue()
Gets the internal value of the requirementboolean
isDataMatch
(Pokemon pixelmon) If the data type matches the parsed requirementboolean
isMinecraftMatch
(StatueEntity entity) If the minecraft type matches the parsed requirementboolean
If 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,StatueEntity, createInstanceStatueSpecification>> (StatueSpecification value) Description copied from interface:Requirement
Creates a new instance of the requirement with the given value- Specified by:
createInstance
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
value
- The value- Returns:
- The new requirement instance
-
getPriority
public int getPriority()Description copied from interface:Requirement
Gets the order priority of the requirement. Higher number = higher priority (i.e. it is applied first)- Specified by:
getPriority
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Returns:
- The priority
-
shouldContinue
public boolean shouldContinue()Description copied from interface:Requirement
If 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:
shouldContinue
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Returns:
- True if it should continue processing
-
getAliases
Description copied from interface:Requirement
The aliases of the requirement that it can match against- Specified by:
getAliases
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Returns:
- The aliases
-
fits
Description copied from interface:Requirement
Checks if the given fits for this requirement- Specified by:
fits
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
spec
- The parsed spec- Returns:
- True if this requirement is found in the parameter
-
create
Description copied from interface:Requirement
Creates a list of requirements from the spec being parsed- Specified by:
create
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
spec
- The spec being parsed- Returns:
- The new list of requirements
-
isMinecraftMatch
Description copied from interface:Requirement
If the minecraft type matches the parsed requirement- Specified by:
isMinecraftMatch
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
entity
- The minecraft data to check against- Returns:
- True if a match
-
isDataMatch
Description copied from interface:Requirement
If the data type matches the parsed requirement- Specified by:
isDataMatch
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
pixelmon
- The data to check against- Returns:
- True if a match
-
applyMinecraft
Description copied from interface:Requirement
Applis the parsed requirement to the minecraft data- Specified by:
applyMinecraft
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
statue
- The minecraft data
-
getValue
Description copied from interface:Requirement
Gets the internal value of the requirement- Specified by:
getValue
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Returns:
- The value stored
-
applyData
Description copied from interface:Requirement
Applies the parsed requirement to the data- Specified by:
applyData
in interfaceRequirement<Pokemon,
StatueEntity, StatueSpecification> - Parameters:
pokemon
- The data
-