public class Cards
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static com.google.gson.Gson |
GSON |
Constructor and Description |
---|
Cards() |
Modifier and Type | Method and Description |
---|---|
static ImmutableCard |
fromCode(java.lang.String code)
Returns a card of the specified unique card code, non case-sensitive
|
static ImmutableCard |
fromNBT(net.minecraft.nbt.CompoundNBT tag)
Gets a card from an NBT tag, mostly used for going from CardItems to an ImmutableCard instance
|
static ImmutableCard |
fromPokemonID(int pokemonID)
Gets a card based on the Pokemon national dex ID #
|
static java.util.List<ImmutableCard> |
getAll() |
static java.util.List<ImmutableCard> |
getCardsInRarities(int setID,
java.util.Set<CardRarity> rarities)
Gets all the cards in the specified set for the given rarities
|
static ImmutableCard |
getEnergyCard(Energy energy)
Gets a card of a specific type of energy
|
static java.util.List<ImmutableCard> |
getEnergyCards()
Gets a List of all energy cards
|
static ImmutableCard |
getRandomBasicEnergyCard()
Returns a random, non special energy (e.g.
|
static ImmutableCard |
getRandomCard()
Gets a random card from all cards
|
static ImmutableCard |
getRandomCard(Energy energy) |
static ImmutableCard |
getRandomCardOfRarity(int setID,
CardRarity cardRarity,
boolean isHolo)
Gets a single random card in a set for a specified rarity
|
static 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.util.ResourceLocation rl,
com.google.gson.JsonElement json) |
static void |
register(ImmutableCard card) |
public static void register(com.google.gson.Gson gson, net.minecraft.util.ResourceLocation rl, com.google.gson.JsonElement json)
public static void register(ImmutableCard card)
public static java.util.List<ImmutableCard> getAll()
public static ImmutableCard getRandomCard(Energy energy)
public static ImmutableCard getRandomBasicEnergyCard()
public static ImmutableCard getRareOrBetterCard(int setID, float weight, boolean isHolo)
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 holographicpublic static java.util.List<ImmutableCard> getCardsInRarities(int setID, java.util.Set<CardRarity> rarities)
setID
- - ID of the set you want to checkrarities
- - Set of rarities you want cards ofpublic static ImmutableCard getRandomCardOfRarity(int setID, CardRarity cardRarity, boolean isHolo)
setID
- - The set you want the card fromcardRarity
- - The rarity of the cardisHolo
- - If the card is holographicpublic static ImmutableCard getRandomCard()
public static java.util.List<ImmutableCard> getEnergyCards()
public static ImmutableCard getEnergyCard(Energy energy)
energy
- - The Energy type you want the card ofpublic static ImmutableCard fromPokemonID(int pokemonID)
pokemonID
- - The National Dex ID #public static ImmutableCard fromCode(java.lang.String code)
code
- - The card codepublic static ImmutableCard fromNBT(net.minecraft.nbt.CompoundNBT tag)
tag
- - The tag with the card data in it