Record Class ProfilePublicKey.Data

java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.ProfilePublicKey.Data
Enclosing class:
ProfilePublicKey

public static record ProfilePublicKey.Data(Instant expiresAt, PublicKey key, byte[] keySignature) extends Record
  • Field Details

    • expiresAt

      private final Instant expiresAt
      The field for the expiresAt record component.
    • key

      private final PublicKey key
      The field for the key record component.
    • keySignature

      private final byte[] keySignature
      The field for the keySignature record component.
    • MAX_KEY_SIGNATURE_SIZE

      private static final int MAX_KEY_SIGNATURE_SIZE
      See Also:
    • CODEC

      public static final com.mojang.serialization.Codec<ProfilePublicKey.Data> CODEC
  • Constructor Details

    • Data

      public Data(FriendlyByteBuf p_219809_)
    • Data

      public Data(Instant expiresAt, PublicKey key, byte[] keySignature)
      Creates an instance of a Data record class.
      Parameters:
      expiresAt - the value for the expiresAt record component
      key - the value for the key record component
      keySignature - the value for the keySignature record component
  • Method Details

    • write

      public void write(FriendlyByteBuf p_219816_)
    • validateSignature

      boolean validateSignature(SignatureValidator p_240296_, UUID p_240297_)
    • signedPayload

      private byte[] signedPayload(UUID p_240267_)
    • hasExpired

      public boolean hasExpired()
    • hasExpired

      public boolean hasExpired(Duration p_243376_)
    • equals

      public boolean equals(Object p_219822_)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      p_219822_ - the object with which to compare
      Returns:
      true if this object is the same as the p_219822_ argument; false otherwise.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • expiresAt

      public Instant expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component
    • key

      public PublicKey key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • keySignature

      public byte[] keySignature()
      Returns the value of the keySignature record component.
      Returns:
      the value of the keySignature record component