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 aCardSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderSet<ImmutableCard> cards()Returns the value of thecardsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhasPack()Returns the value of thehasPackrecord component.intid()Deprecated, for removal: This API element is subject to removal in a future version.sprite()Returns the value of thespriterecord component.final StringtoString()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 aCardSetrecord class.
-
-
Method Details
-
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 theidrecord component.- Returns:
- the value of the
idrecord component
-
hasPack
public boolean hasPack()Returns the value of thehasPackrecord component.- Returns:
- the value of the
hasPackrecord component
-
cards
Returns the value of thecardsrecord component.- Returns:
- the value of the
cardsrecord component
-
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-