Record Class ProfilePublicKey.Data
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.ProfilePublicKey.Data
- Enclosing class:
ProfilePublicKey
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ProfilePublicKey.Data> private final InstantThe field for theexpiresAtrecord component.private final PublicKeyThe field for thekeyrecord component.private final byte[]The field for thekeySignaturerecord component.private static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.booleanbooleanhasExpired(Duration p_243376_) final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.byte[]Returns the value of thekeySignaturerecord component.private byte[]signedPayload(UUID p_240267_) final StringtoString()Returns a string representation of this record class.(package private) booleanvalidateSignature(SignatureValidator p_240296_, UUID p_240297_) voidwrite(FriendlyByteBuf p_219816_)
-
Field Details
-
expiresAt
The field for theexpiresAtrecord component. -
key
The field for thekeyrecord component. -
keySignature
private final byte[] keySignatureThe field for thekeySignaturerecord component. -
MAX_KEY_SIGNATURE_SIZE
private static final int MAX_KEY_SIGNATURE_SIZE- See Also:
-
CODEC
-
-
Constructor Details
-
Data
-
Data
Creates an instance of aDatarecord class.- Parameters:
expiresAt- the value for theexpiresAtrecord componentkey- the value for thekeyrecord componentkeySignature- the value for thekeySignaturerecord 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 theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
keySignature
public byte[] keySignature()Returns the value of thekeySignaturerecord component.- Returns:
- the value of the
keySignaturerecord component
-