Class RarityRequirement
java.lang.Object
com.pixelmonmod.api.requirement.AbstractRequirement<Card,net.minecraft.world.item.ItemStack,A>
com.pixelmonmod.api.tcg.requirement.AbstractCardRequirement<CardRarity>
com.pixelmonmod.api.tcg.requirement.impl.RarityRequirement
- All Implemented Interfaces:
Requirement<Card,
net.minecraft.world.item.ItemStack, CardRarity>
-
Field Summary
Fields inherited from class com.pixelmonmod.api.requirement.AbstractRequirement
keys
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the parsed requirement to the dataParseAttempt<List<Requirement<Card,
net.minecraft.world.item.ItemStack, ?>>> Attempts to parse the spec with the key that was found in the spec stringParseAttempt<Requirement<Card,
net.minecraft.world.item.ItemStack, CardRarity>> createInstance
(CardRarity value) Creates a new instance of the requirement with the given valuegetValue()
Gets the internal value of the requirementboolean
isDataMatch
(Card card) If the data type matches the parsed requirementMethods inherited from class com.pixelmonmod.api.tcg.requirement.AbstractCardRequirement
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
getPriority, shouldContinue
-
Constructor Details
-
RarityRequirement
public RarityRequirement() -
RarityRequirement
-
-
Method Details
-
createInstance
public ParseAttempt<Requirement<Card,net.minecraft.world.item.ItemStack, createInstanceCardRarity>> (CardRarity value) Description copied from interface:Requirement
Creates a new instance of the requirement with the given value- Parameters:
value
- The value- Returns:
- The new requirement instance
-
isDataMatch
Description copied from interface:Requirement
If the data type matches the parsed requirement- Parameters:
card
- The data to check against- Returns:
- True if a match
-
applyData
Description copied from interface:Requirement
Applies the parsed requirement to the data- Parameters:
card
- The data
-
getValue
Description copied from interface:Requirement
Gets the internal value of the requirement- Returns:
- The value stored
-
create
public ParseAttempt<List<Requirement<Card,net.minecraft.world.item.ItemStack, create?>>> (String key, String spec) Description copied from class:AbstractRequirement
Attempts to parse the spec with the key that was found in the spec string- Specified by:
create
in classAbstractCardRequirement<CardRarity>
- Parameters:
key
- The key foundspec
- The spec being parsed- Returns:
- The parse attempt
-