Class Cards
java.lang.Object
com.pixelmonmod.tcg.api.accessors.Cards
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCard
Returns a card of the specified unique card code, non case-sensitivestatic ImmutableCard
fromNBT
(net.minecraft.nbt.CompoundTag tag) Gets a card from an NBT tag, mostly used for going from CardItems to an ImmutableCard instancestatic ImmutableCard
fromPokemonID
(int pokemonID) Gets a card based on the Pokemon national dex ID #static List<ImmutableCard>
getAll()
static List<ImmutableCard>
getCardsInRarities
(int setID, Set<CardRarity> rarities) Gets all the cards in the specified set for the given raritiesstatic ImmutableCard
getEnergyCard
(Energy energy) Gets a card of a specific type of energystatic List<ImmutableCard>
Gets a List of all energy cardsstatic ImmutableCard
Returns a random, non special energy (e.g.static ImmutableCard
Gets a random card from all cardsstatic ImmutableCard
getRandomCard
(Energy energy) static ImmutableCard
getRandomCardOfRarity
(int setID, CardRarity cardRarity, boolean isHolo) Gets a single random card in a set for a specified raritystatic ImmutableCard
getRareOrBetterCard
(int setID, float weight, boolean isHolo) Gets a card with a CardRarity of Rare or better, based on specific weights of the rarity of those cards (e.g.static void
register
(com.google.gson.Gson gson, net.minecraft.resources.ResourceLocation rl, com.google.gson.JsonElement json) static void
register
(ImmutableCard card)
-
Field Details
-
GSON
public static final com.google.gson.Gson GSON
-
-
Constructor Details
-
Cards
public Cards()
-
-
Method Details
-
register
public static void register(com.google.gson.Gson gson, net.minecraft.resources.ResourceLocation rl, com.google.gson.JsonElement json) -
register
-
getAll
-
getRandomCard
-
getRandomBasicEnergyCard
Returns a random, non special energy (e.g. fire, grass)- Returns:
- Returns a random, non special energy (e.g. fire, grass)
-
getRareOrBetterCard
Gets a card with a CardRarity of Rare or better, based on specific weights of the rarity of those cards (e.g. rare is more common than secret rare)- Parameters:
setID
- - The set to get the card fromweight
- - The weight passed in from the pack (determines what rarity of card gets picked)isHolo
- - If the card is holographic- Returns:
- - The given card in the givene set with whatever rarity that gets found by the weight
-
getCardsInRarities
Gets all the cards in the specified set for the given rarities- Parameters:
setID
- - ID of the set you want to checkrarities
- - Set of rarities you want cards of- Returns:
- - List of Cards in the specified rarities
-
getRandomCardOfRarity
Gets a single random card in a set for a specified rarity- Parameters:
setID
- - The set you want the card fromcardRarity
- - The rarity of the cardisHolo
- - If the card is holographic- Returns:
- - The card of the given rarity in the given set
-
getRandomCard
Gets a random card from all cards- Returns:
- A random card from all cards
-
getEnergyCards
Gets a List of all energy cards- Returns:
- A list of all energy Cards
-
getEnergyCard
Gets a card of a specific type of energy- Parameters:
energy
- - The Energy type you want the card of- Returns:
- - A card of that specific energy.
-
fromPokemonID
Gets a card based on the Pokemon national dex ID #- Parameters:
pokemonID
- - The National Dex ID #- Returns:
- - A card of the specified Pokemon Dex ID
-
fromCode
Returns a card of the specified unique card code, non case-sensitive- Parameters:
code
- - The card code- Returns:
- - A card of the specified code
-
fromNBT
Gets a card from an NBT tag, mostly used for going from CardItems to an ImmutableCard instance- Parameters:
tag
- - The tag with the card data in it- Returns:
- - A card of the specified code found in the NBT
-