Class AbstractBooleanStatueRequirement
java.lang.Object
com.pixelmonmod.api.requirement.AbstractRequirement<Pokemon,StatueEntity,A>
com.pixelmonmod.api.statue.requirement.AbstractStatueRequirement<Boolean>
com.pixelmonmod.api.statue.requirement.AbstractBooleanStatueRequirement
- All Implemented Interfaces:
Requirement<Pokemon,
StatueEntity, Boolean>
- Direct Known Subclasses:
AnimatedRequirement
,BlackAndWhiteShaderRequirement
,CanMoveRequirement
,CelShaderRequirement
,CrownedRequirement
,LegendaryRequirement
,PrimalEvolutionRequirement
,RainbowShaderRequirement
,ShinyRequirement
,UltraBeastRequirement
Basic abstract implementation for specs following the
basic implementation that have a boolean value so that
boolean specs are handled consistently.
All boolean specs extending this class can be matched using the following formats:
> "spec" - defaults to true > "!spec" - becomes false > "!spec:true" - false > "spec:true" - true > "spec:false" - false > "spec:1" - true > "spec:0" - false
The "!" inverts the value on any boolean spec.
All boolean specs extending this class can be matched using the following formats:
> "spec" - defaults to true > "!spec" - becomes false > "!spec:true" - false > "spec:true" - true > "spec:false" - false > "spec:1" - true > "spec:0" - false
The "!" inverts the value on any boolean spec.
-
Field Summary
Fields inherited from class com.pixelmonmod.api.requirement.AbstractRequirement
keys
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
AbstractBooleanStatueRequirement
(Set<String> keys, boolean value) -
Method Summary
Modifier and TypeMethodDescriptionCreates a list of requirements from the spec being parsedAttempts to parse the spec with the key that was found in the spec stringboolean
Checks if the given fits for this requirementgetValue()
Gets the internal value of the requirementprotected boolean
Methods inherited from class com.pixelmonmod.api.statue.requirement.AbstractStatueRequirement
applyMinecraft, isMinecraftMatch
Methods inherited from class com.pixelmonmod.api.requirement.AbstractRequirement
getAliases
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.api.requirement.Requirement
applyData, createInstance, getPriority, isDataMatch, shouldContinue
-
Field Details
-
value
protected boolean value
-
-
Constructor Details
-
AbstractBooleanStatueRequirement
-
AbstractBooleanStatueRequirement
-
-
Method Details
-
fits
Description copied from interface:Requirement
Checks if the given fits for this requirement- Specified by:
fits
in interfaceRequirement<Pokemon,
StatueEntity, Boolean> - Overrides:
fits
in classAbstractRequirement<Pokemon,
StatueEntity, Boolean> - 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, Boolean> - Overrides:
create
in classAbstractRequirement<Pokemon,
StatueEntity, Boolean> - Parameters:
spec
- The spec being parsed- Returns:
- The new list of requirements
-
create
Description copied from class:AbstractRequirement
Attempts to parse the spec with the key that was found in the spec string- Specified by:
create
in classAbstractStatueRequirement<Boolean>
- Parameters:
key
- The key foundspec
- The spec being parsed- Returns:
- The parse attempt
-
parseBoolean
-
getValue
Description copied from interface:Requirement
Gets the internal value of the requirement- Returns:
- The value stored
-