Class AbstractDoublePokemonRequirement
java.lang.Object
com.pixelmonmod.api.requirement.AbstractRequirement<Pokemon,PixelmonEntity,A>
com.pixelmonmod.api.pokemon.requirement.AbstractPokemonRequirement<Double>
com.pixelmonmod.api.pokemon.requirement.AbstractDoublePokemonRequirement
- All Implemented Interfaces:
Requirement<Pokemon,
PixelmonEntity, Double>
- Direct Known Subclasses:
SizeRequirement
Basic abstract implementation for specs following
the basic implementation that have a double value so that
double specs are handled consistently.
All double specs extending this class can use the following format: > "spec" - returns the provided default value > "spec:" - returns the provided integer
> "spec:" - returns the provided default value
All double specs extending this class can use the following format: > "spec" - returns the provided default value > "spec:
-
Field Summary
Fields inherited from class com.pixelmonmod.api.requirement.AbstractRequirement
keys
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDoublePokemonRequirement
(Set<String> keys, double defaultValue) protected
AbstractDoublePokemonRequirement
(Set<String> keys, double defaultValue, double value) -
Method Summary
Modifier and TypeMethodDescriptionAttempts to parse the spec with the key that was found in the spec stringgetValue()
Gets the internal value of the requirementMethods inherited from class com.pixelmonmod.api.pokemon.requirement.AbstractPokemonRequirement
applyMinecraft, isMinecraftMatch
Methods inherited from class com.pixelmonmod.api.requirement.AbstractRequirement
create, fits, 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 double value -
defaultValue
protected double defaultValue
-
-
Constructor Details
-
AbstractDoublePokemonRequirement
-
AbstractDoublePokemonRequirement
-
-
Method Details
-
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 classAbstractPokemonRequirement<Double>
- Parameters:
key
- The key foundspec
- The spec being parsed- Returns:
- The parse attempt
-
getValue
Description copied from interface:Requirement
Gets the internal value of the requirement- Returns:
- The value stored
-