Package com.pixelmonmod.tcg.api.card
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 TypeMethodDescriptiondefault CardcreateCard(ImmutableCard card) Creates an instance of theImmutableCardwith given random propertiesdefault net.minecraft.world.item.ItemStackcreateCardItem(ImmutableCard card) Creates anItemStackintance of theImmutableCardtype passeddefault CardreadCard(net.minecraft.world.item.ItemStack itemStack) Gets the instance of a card from the item
-
Method Details
-
createCardItem
Creates anItemStackintance of theImmutableCardtype passed- Parameters:
card- The type of card to create- Returns:
- The new card item made
-
createCard
Creates an instance of theImmutableCardwith given random properties- Parameters:
card- The type of card created- Returns:
- The instance of the card
-
readCard
Gets the instance of a card from the item- Parameters:
itemStack- The card item- Returns:
- The card instance
-