Interface CardFactory


public interface CardFactory
Factory interface for implementing card creation This implementation should only be accessed through the exposed methods in the CardProxy
  • Method Summary

    Modifier and Type
    Method
    Description
    default Card
    Creates an instance of the ImmutableCard with given random properties
    default net.minecraft.world.item.ItemStack
    Creates an ItemStack intance of the ImmutableCard type passed
    default Card
    readCard(net.minecraft.world.item.ItemStack itemStack)
    Gets the instance of a card from the item
  • Method Details

    • createCardItem

      default 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

      default 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

      default 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