Package com.pixelmonmod.tcg.api.card.set
Record Class CardSet
java.lang.Object
java.lang.Record
com.pixelmonmod.tcg.api.card.set.CardSet
- Record Components:
id
- The legacy integer ID of the sethasPack
- If the set has a pack item
public record CardSet(int id, boolean hasPack, net.minecraft.core.HolderSet<ImmutableCard> cards, ResourceWithFallback sprite)
extends Record
Represents a set of cards
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCardSet
(int id, boolean hasPack, net.minecraft.core.HolderSet<ImmutableCard> cards, ResourceWithFallback sprite) Creates an instance of aCardSet
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderSet
<ImmutableCard> cards()
Returns the value of thecards
record component.final boolean
Indicates whether some other object is "equal to" this one.net.minecraft.world.item.ItemStack
net.minecraft.world.item.ItemStack
getItemStack
(int count) final int
hashCode()
Returns a hash code value for this object.boolean
hasPack()
Returns the value of thehasPack
record component.int
id()
Deprecated, for removal: This API element is subject to removal in a future version.sprite()
Returns the value of thesprite
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
CardSet
public CardSet(@Deprecated(forRemoval=true) int id, boolean hasPack, net.minecraft.core.HolderSet<ImmutableCard> cards, ResourceWithFallback sprite) Creates an instance of aCardSet
record class.
-
-
Method Details
-
getItemStack
public net.minecraft.world.item.ItemStack getItemStack(int count) -
getItemStack
public net.minecraft.world.item.ItemStack getItemStack() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
hasPack
public boolean hasPack()Returns the value of thehasPack
record component.- Returns:
- the value of the
hasPack
record component
-
cards
Returns the value of thecards
record component.- Returns:
- the value of the
cards
record component
-
sprite
Returns the value of thesprite
record component.- Returns:
- the value of the
sprite
record component
-