Package com.pixelmonmod.api.requirement
Interface Requirement<A,B,C>
- Type Parameters:
A
- The reforged objectB
- The minecraft objectC
- The data being stored in this requirement
- All Known Implementing Classes:
AbilityRequirement
,AbstractBooleanPokemonRequirement
,AbstractBooleanRequirement
,AbstractBooleanStatueRequirement
,AbstractCardRequirement
,AbstractIntegerPokemonRequirement
,AbstractIntegerRequirement
,AbstractIntegerStatueRequirement
,AbstractPokemonRequirement
,AbstractRecursivePokemonRequirement
,AbstractRecursiveRequirement
,AbstractRecursiveStatueRequirement
,AbstractRequirement
,AbstractStatueRequirement
,AbstractStringPokemonRequirement
,AbstractStringRequirement
,AbstractStringStatueRequirement
,AIRequirement
,AnimatedRequirement
,AnimationFrameRequirement
,AnimationTypeRequirement
,BlackAndWhiteShaderRequirement
,BlackAndWhiteShaderRequirement
,BossRequirement
,BoundingBoxModeRequirement
,CanMegaEvolveRequirement
,CanMoveRequirement
,CelShaderRequirement
,CelShaderRequirement
,CloneRequirement
,CompatibleMoveRequirement
,CrownedRequirement
,CrownedRequirement
,EggGroupRequirement
,EggGroupRequirement
,EggRequirement
,EVsModifyRequirement
,EVsRequirement
,ExpRequirement
,FormRequirement
,FormRequirement
,FriendshipRequirement
,GenderRequirement
,GenderRequirement
,GenerationRequirement
,GenerationRequirement
,GenericBuiltPokemonRequirement
,GigantamaxFactorRequirement
,GimmighoulCoinsGivenRequirement
,GrowthRequirement
,GrowthRequirement
,GrowthStageRequirement
,GrowthStageRequirement
,HasSpecFlagRequirement
,HasSpecFlagRequirement
,HeldItemRequirement
,HiddenAbilityRequirement
,IsBossRequirement
,IVsModifyRequirement
,IVsRequirement
,LakeTrioRequirement
,LakeTrioRequirement
,LegendaryRequirement
,LegendaryRequirement
,LevelRequirement
,LogicalAndRequirement
,LogicalAndRequirement
,LogicalNOTRequirement
,LogicalNOTRequirement
,LogicalOrRequirement
,LogicalOrRequirement
,MaximumFriendshipRequirement
,MaximumLevelRequirement
,MinimumFriendshipRequirement
,MinimumLevelRequirement
,MoveRequirement
,NatureRequirement
,NicknameRequirement
,NicknameRequirement
,NoDropsRequirement
,NuggetsFedRequirement
,OriginalTrainerNameRequirement
,PaletteRequirement
,PaletteRequirement
,PokeBallRequirement
,PokerusRequirement
,PositionRequirement
,PositionRequirement
,PrimalEvolutionRequirement
,PrimalEvolutionRequirement
,RainbowShaderRequirement
,RainbowShaderRequirement
,RandomSpeciesRequirement
,RandomSpeciesRequirement
,RarityRequirement
,ResetEVsRequirement
,ResetIVsRequirement
,RibbonRequirement
,ShaderRequirement
,ShaderRequirement
,ShinyRequirement
,ShinyRequirement
,ShornRequirement
,SpeciesRequirement
,SpeciesRequirement
,StatsModifyRequirement
,StatsRequirement
,StatueTextureRequirement
,StatusRequirement
,TypeRequirement
,TypeRequirement
,UltraBeastRequirement
,UltraBeastRequirement
,UltraBurstRequirement
,UnbattleableRequirement
,UnbreedableRequirement
,UncatchableRequirement
,UndexableRequirement
,UntradeableRequirement
,WildRequirement
public interface Requirement<A,B,C>
A basic requirement for matching and creating
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the parsed requirement to the datavoid
applyMinecraft
(B b) Applis the parsed requirement to the minecraft dataParseAttempt<List<Requirement<A,
B, ?>>> Creates a list of requirements from the spec being parsedcreateInstance
(C value) Creates 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 againstdefault int
Gets the order priority of the requirement.getValue()
Gets the internal value of the requirementboolean
isDataMatch
(A a) If the data type matches the parsed requirementboolean
If the minecraft type matches the parsed requirementdefault boolean
If the spec should continue processing the results after applying this requirement.
-
Method Details
-
getPriority
default int getPriority()Gets the order priority of the requirement. Higher number = higher priority (i.e. it is applied first)- Returns:
- The priority
-
shouldContinue
default boolean shouldContinue()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- Returns:
- True if it should continue processing
-
getAliases
The aliases of the requirement that it can match against- Returns:
- The aliases
-
fits
Checks if the given fits for this requirement- Parameters:
spec
- The parsed spec- Returns:
- True if this requirement is found in the parameter
-
create
Creates a list of requirements from the spec being parsed- Parameters:
spec
- The spec being parsed- Returns:
- The new list of requirements
-
createInstance
Creates a new instance of the requirement with the given value- Parameters:
value
- The value- Returns:
- The new requirement instance
-
isDataMatch
If the data type matches the parsed requirement- Parameters:
a
- The data to check against- Returns:
- True if a match
-
isMinecraftMatch
If the minecraft type matches the parsed requirement- Parameters:
b
- The minecraft data to check against- Returns:
- True if a match
-
applyData
Applies the parsed requirement to the data- Parameters:
a
- The data
-
applyMinecraft
Applis the parsed requirement to the minecraft data- Parameters:
b
- The minecraft data
-
getValue
C getValue()Gets the internal value of the requirement- Returns:
- The value stored
-