Class MovePPRequirement
java.lang.Object
com.pixelmonmod.api.pokemon.requirement.impl.MovePPRequirement
- All Implemented Interfaces:
Requirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>>
public class MovePPRequirement
extends Object
implements Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<Integer,Integer>>
-
Constructor Summary
ConstructorDescriptionMovePPRequirement
(int pos, int pp) MovePPRequirement
(com.mojang.datafixers.util.Pair<Integer, Integer> data) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the parsed requirement to the datavoid
applyMinecraft
(PixelmonEntity entity) Applis the parsed requirement to the minecraft dataCreates a list of requirements from the spec being parsedParseAttempt<Requirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>>> createInstance
(com.mojang.datafixers.util.Pair<Integer, Integer> 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 againstgetValue()
Gets the internal value of the requirementboolean
isDataMatch
(Pokemon pixelmon) If the data type matches the parsed requirementboolean
isMinecraftMatch
(PixelmonEntity entity) If the minecraft type matches the parsed requirementMethods 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
getPriority, shouldContinue
-
Constructor Details
-
MovePPRequirement
public MovePPRequirement() -
MovePPRequirement
public MovePPRequirement(int pos, int pp) -
MovePPRequirement
-
-
Method Details
-
getAliases
Description copied from interface:Requirement
The aliases of the requirement that it can match against- Specified by:
getAliases
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Returns:
- The aliases
-
fits
Description copied from interface:Requirement
Checks if the given fits for this requirement- Specified by:
fits
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - 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,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Parameters:
spec
- The spec being parsed- Returns:
- The new list of requirements
-
createInstance
public ParseAttempt<Requirement<Pokemon,PixelmonEntity, createInstancecom.mojang.datafixers.util.Pair<Integer, Integer>>> (com.mojang.datafixers.util.Pair<Integer, Integer> value) Description copied from interface:Requirement
Creates a new instance of the requirement with the given value- Specified by:
createInstance
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Parameters:
value
- The value- Returns:
- The new requirement instance
-
isMinecraftMatch
Description copied from interface:Requirement
If the minecraft type matches the parsed requirement- Specified by:
isMinecraftMatch
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - 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,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Parameters:
pixelmon
- The data to check against- Returns:
- True if a match
-
applyData
Description copied from interface:Requirement
Applies the parsed requirement to the data- Specified by:
applyData
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Parameters:
pixelmon
- The data
-
applyMinecraft
Description copied from interface:Requirement
Applis the parsed requirement to the minecraft data- Specified by:
applyMinecraft
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Parameters:
entity
- The minecraft data
-
getValue
Description copied from interface:Requirement
Gets the internal value of the requirement- Specified by:
getValue
in interfaceRequirement<Pokemon,
PixelmonEntity, com.mojang.datafixers.util.Pair<Integer, Integer>> - Returns:
- The value stored
-