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 Card
createCard
(ImmutableCard card) Creates an instance of theImmutableCard
with given random propertiesdefault net.minecraft.world.item.ItemStack
createCardItem
(ImmutableCard card) Creates anItemStack
intance of theImmutableCard
type passeddefault Card
readCard
(net.minecraft.world.item.ItemStack itemStack) Gets the instance of a card from the item
-
Method Details
-
createCardItem
Creates anItemStack
intance of theImmutableCard
type passed- Parameters:
card
- The type of card to create- Returns:
- The new card item made
-
createCard
Creates an instance of theImmutableCard
with 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
-