Package com.petrolpark.core.badge
Record Class BadgeItem.BadgeAward
java.lang.Object
java.lang.Record
com.petrolpark.core.badge.BadgeItem.BadgeAward
- Enclosing class:
BadgeItem
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BadgeItem.BadgeAward> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, BadgeItem.BadgeAward> -
Constructor Summary
ConstructorsConstructorDescriptionBadgeAward(UUID playerUUID, long awardDate) Creates an instance of aBadgeAwardrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theawardDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theplayerUUIDrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,BadgeItem.BadgeAward> STREAM_CODEC
-
-
Constructor Details
-
BadgeAward
Creates an instance of aBadgeAwardrecord class.- Parameters:
playerUUID- the value for theplayerUUIDrecord componentawardDate- the value for theawardDaterecord component
-
-
Method Details
-
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 '=='. -
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. -
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. -
playerUUID
Returns the value of theplayerUUIDrecord component.- Returns:
- the value of the
playerUUIDrecord component
-
awardDate
public long awardDate()Returns the value of theawardDaterecord component.- Returns:
- the value of the
awardDaterecord component
-