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>

public class RarityRequirement extends AbstractCardRequirement<CardRarity>
  • Constructor Details

    • RarityRequirement

      public RarityRequirement()
    • RarityRequirement

      public RarityRequirement(CardRarity rarity)
  • Method Details

    • createInstance

      public ParseAttempt<Requirement<Card,net.minecraft.world.item.ItemStack,CardRarity>> createInstance(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

      public boolean isDataMatch(Card card)
      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

      public void applyData(Card card)
      Description copied from interface: Requirement
      Applies the parsed requirement to the data
      Parameters:
      card - The data
    • getValue

      public CardRarity 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 class AbstractCardRequirement<CardRarity>
      Parameters:
      key - The key found
      spec - The spec being parsed
      Returns:
      The parse attempt