Class CardProxy

java.lang.Object
com.pixelmonmod.tcg.api.card.CardProxy

public class CardProxy extends Object
Static proxy for accessing CardFactory implementation To change the CardFactory implementation use the setFactory(CardFactory) method during initialization
  • Constructor Details

    • CardProxy

      public CardProxy()
  • Method Details

    • setFactory

      public static void setFactory(CardFactory factory)
      Sets the factory implementation
      Parameters:
      factory - The factory implementation
    • createCardItem

      public static net.minecraft.world.item.ItemStack createCardItem(ImmutableCard card)
      Creates an ItemStack intance of the ImmutableCard type passed
      Parameters:
      card - The type of card to create
      Returns:
      The new card item made
    • createCard

      public static Card createCard(ImmutableCard card)
      Creates an instance of the ImmutableCard with given random properties
      Parameters:
      card - The type of card created
      Returns:
      The instance of the card
    • readCard

      public static Card readCard(net.minecraft.world.item.ItemStack itemStack)
      Gets the instance of a card from the item
      Parameters:
      itemStack - The card item
      Returns:
      The card instance