Record Class ProfilePublicKey.Data
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.ProfilePublicKey.Data
- Enclosing class:
ProfilePublicKey
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ProfilePublicKey.Data>
private final Instant
The field for theexpiresAt
record component.private final PublicKey
The field for thekey
record component.private final byte[]
The field for thekeySignature
record component.private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpiresAt
record component.boolean
boolean
hasExpired
(Duration p_243376_) final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.byte[]
Returns the value of thekeySignature
record component.private byte[]
signedPayload
(UUID p_240267_) final String
toString()
Returns a string representation of this record class.(package private) boolean
validateSignature
(SignatureValidator p_240296_, UUID p_240297_) void
write
(FriendlyByteBuf p_219816_)
-
Field Details
-
expiresAt
The field for theexpiresAt
record component. -
key
The field for thekey
record component. -
keySignature
private final byte[] keySignatureThe field for thekeySignature
record component. -
MAX_KEY_SIGNATURE_SIZE
private static final int MAX_KEY_SIGNATURE_SIZE- See Also:
-
CODEC
-
-
Constructor Details
-
Data
-
Data
Creates an instance of aData
record class.- Parameters:
expiresAt
- the value for theexpiresAt
record componentkey
- the value for thekey
record componentkeySignature
- the value for thekeySignature
record component
-
-
Method Details
-
write
-
validateSignature
-
signedPayload
-
hasExpired
public boolean hasExpired() -
hasExpired
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
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. -
expiresAt
Returns the value of theexpiresAt
record component.- Returns:
- the value of the
expiresAt
record component
-
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
keySignature
public byte[] keySignature()Returns the value of thekeySignature
record component.- Returns:
- the value of the
keySignature
record component
-