Record Class ModDataComponents.CurioSlot
java.lang.Object
java.lang.Record
com.breakinblocks.graveless.registry.ModDataComponents.CurioSlot
- Enclosing class:
ModDataComponents
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ModDataComponents.CurioSlot> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, ModDataComponents.CurioSlot> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancosmetic()Returns the value of thecosmeticrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, ModDataComponents.CurioSlot> STREAM_CODEC
-
-
Constructor Details
-
CurioSlot
Creates an instance of aCurioSlotrecord class.- Parameters:
type- the value for thetyperecord componentindex- the value for theindexrecord componentcosmetic- the value for thecosmeticrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
cosmetic
public boolean cosmetic()Returns the value of thecosmeticrecord component.- Returns:
- the value of the
cosmeticrecord component
-