Record Class SignedMessage

java.lang.Object
java.lang.Record
net.minecraft.network.message.SignedMessage
Record Components:
signedHeader -
headerSignature -
signedBody -
unsignedContent -

public record SignedMessage(class_7614 signedHeader, MessageSignature headerSignature, class_7608 signedBody, Optional<Text> unsignedContent) extends Record
A signed message, consisting of the signature, the signed content, and the optional unsigned content supplied when the chat decorator produced unsigned message due to the chat preview being disabled on either side.

Note that the signature itself might not be valid.

Mappings:
Namespace Name
official rv
intermediary net/minecraft/class_7471
named net/minecraft/network/message/SignedMessage
official c
intermediary comp_926
named signedHeader
official d
intermediary comp_927
named headerSignature
official e
intermediary comp_928
named signedBody
official f
intermediary comp_830
named unsignedContent
  • Field Details

    • signedHeader

      private final class_7614 signedHeader
      The field for the signedHeader record component.
    • headerSignature

      private final MessageSignature headerSignature
      The field for the headerSignature record component.
    • signedBody

      private final class_7608 signedBody
      The field for the signedBody record component.
    • unsignedContent

      private final Optional<Text> unsignedContent
      The field for the unsignedContent record component.
    • SERVERBOUND_TIME_TO_LIVE

      public static final Duration SERVERBOUND_TIME_TO_LIVE
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a:Ljava/time/Duration;
      intermediary field_39786 Lnet/minecraft/class_7471;field_39786:Ljava/time/Duration;
      named SERVERBOUND_TIME_TO_LIVE Lnet/minecraft/network/message/SignedMessage;SERVERBOUND_TIME_TO_LIVE:Ljava/time/Duration;
    • CLIENTBOUND_TIME_TO_LIVE

      public static final Duration CLIENTBOUND_TIME_TO_LIVE
      Mappings:
      Namespace Name Mixin selector
      official b Lrv;b:Ljava/time/Duration;
      intermediary field_39787 Lnet/minecraft/class_7471;field_39787:Ljava/time/Duration;
      named CLIENTBOUND_TIME_TO_LIVE Lnet/minecraft/network/message/SignedMessage;CLIENTBOUND_TIME_TO_LIVE:Ljava/time/Duration;
  • Constructor Details

  • Method Details

    • method_44861

      public static SignedMessage method_44861(ChatMessageSigner chatMessageSigner, Text text)
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Lrs;Lrm;)Lrv;
      intermediary method_44861 Lnet/minecraft/class_7471;method_44861(Lnet/minecraft/class_7470;Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;
      named method_44861 Lnet/minecraft/network/message/SignedMessage;method_44861(Lnet/minecraft/network/message/ChatMessageSigner;Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/SignedMessage;
    • method_44859

      public void method_44859(PacketByteBuf packetByteBuf)
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Lqx;)V
      intermediary method_44859 Lnet/minecraft/class_7471;method_44859(Lnet/minecraft/class_2540;)V
      named method_44859 Lnet/minecraft/network/message/SignedMessage;method_44859(Lnet/minecraft/network/PacketByteBuf;)V
    • method_44860

      public FilteredMessage<SignedMessage> method_44860(@Nullable @Nullable Text text)
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Lrm;)Lagl;
      intermediary method_44860 Lnet/minecraft/class_7471;method_44860(Lnet/minecraft/class_2561;)Lnet/minecraft/class_5837;
      named method_44860 Lnet/minecraft/network/message/SignedMessage;method_44860(Lnet/minecraft/text/Text;)Lnet/minecraft/server/filter/FilteredMessage;
    • method_44863

      public SignedMessage method_44863(Text text)
      Mappings:
      Namespace Name Mixin selector
      official b Lrv;b(Lrm;)Lrv;
      intermediary method_44863 Lnet/minecraft/class_7471;method_44863(Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;
      named method_44863 Lnet/minecraft/network/message/SignedMessage;method_44863(Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/SignedMessage;
    • withoutUnsigned

      public SignedMessage withoutUnsigned()
      Returns the signed chat message with unsignedContent removed if it exists.
      Returns:
      the signed chat message with unsignedContent removed if it exists
      Implementation Note:
      This returns itself if the message does not have an unsigned content.
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a()Lrv;
      intermediary method_44607 Lnet/minecraft/class_7471;method_44607()Lnet/minecraft/class_7471;
      named withoutUnsigned Lnet/minecraft/network/message/SignedMessage;withoutUnsigned()Lnet/minecraft/network/message/SignedMessage;
    • method_44858

      public boolean method_44858(SignatureVerifier signatureVerifier)
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Lame;)Z
      intermediary method_44858 Lnet/minecraft/class_7471;method_44858(Lnet/minecraft/class_7500;)Z
      named method_44858 Lnet/minecraft/network/message/SignedMessage;method_44858(Lnet/minecraft/network/encryption/SignatureVerifier;)Z
    • verify

      public boolean verify(PlayerPublicKey key)
      Returns whether the message can be verified using the public key.
      Returns:
      whether the message can be verified using the public key
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Lbts;)Z
      intermediary method_43867 Lnet/minecraft/class_7471;method_43867(Lnet/minecraft/class_7428;)Z
      named verify Lnet/minecraft/network/message/SignedMessage;verify(Lnet/minecraft/network/encryption/PlayerPublicKey;)Z
    • verify

      public boolean verify(MessageSender messageSender)
      Returns whether the message can be verified using the public key or if the player does not have the key.
      Returns:
      whether the message can be verified using the public key or if the player does not have the key
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Lrh;)Z
      intermediary method_44310 Lnet/minecraft/class_7471;method_44310(Lnet/minecraft/class_7436;)Z
      named verify Lnet/minecraft/network/message/SignedMessage;verify(Lnet/minecraft/network/message/MessageSender;)Z
    • method_44862

      public Text method_44862()
      Mappings:
      Namespace Name Mixin selector
      official b Lrv;b()Lrm;
      intermediary method_44862 Lnet/minecraft/class_7471;method_44862()Lnet/minecraft/class_2561;
      named method_44862 Lnet/minecraft/network/message/SignedMessage;method_44862()Lnet/minecraft/text/Text;
    • getContent

      public Text getContent()
      Returns the content of the message.

      This returns the unsigned content if present, and fallbacks to the signed content.

      Returns:
      the content of the message
      Mappings:
      Namespace Name Mixin selector
      official c Lrv;c()Lrm;
      intermediary method_44125 Lnet/minecraft/class_7471;method_44125()Lnet/minecraft/class_2561;
      named getContent Lnet/minecraft/network/message/SignedMessage;getContent()Lnet/minecraft/text/Text;
    • method_44864

      public Instant method_44864()
      Mappings:
      Namespace Name Mixin selector
      official d Lrv;d()Ljava/time/Instant;
      intermediary method_44864 Lnet/minecraft/class_7471;method_44864()Ljava/time/Instant;
      named method_44864 Lnet/minecraft/network/message/SignedMessage;method_44864()Ljava/time/Instant;
    • method_44865

      public long method_44865()
      Mappings:
      Namespace Name Mixin selector
      official e Lrv;e()J
      intermediary method_44865 Lnet/minecraft/class_7471;method_44865()J
      named method_44865 Lnet/minecraft/network/message/SignedMessage;method_44865()J
    • isExpiredOnServer

      public boolean isExpiredOnServer(Instant currentTime)
      Mappings:
      Namespace Name Mixin selector
      official a Lrv;a(Ljava/time/Instant;)Z
      intermediary method_44747 Lnet/minecraft/class_7471;method_44747(Ljava/time/Instant;)Z
      named isExpiredOnServer Lnet/minecraft/network/message/SignedMessage;isExpiredOnServer(Ljava/time/Instant;)Z
    • isExpiredOnClient

      public boolean isExpiredOnClient(Instant currentTime)
      Mappings:
      Namespace Name Mixin selector
      official b Lrv;b(Ljava/time/Instant;)Z
      intermediary method_44748 Lnet/minecraft/class_7471;method_44748(Ljava/time/Instant;)Z
      named isExpiredOnClient Lnet/minecraft/network/message/SignedMessage;isExpiredOnClient(Ljava/time/Instant;)Z
    • method_44866

      public ChatMessageSigner method_44866()
      Mappings:
      Namespace Name Mixin selector
      official f Lrv;f()Lrs;
      intermediary method_44866 Lnet/minecraft/class_7471;method_44866()Lnet/minecraft/class_7470;
      named method_44866 Lnet/minecraft/network/message/SignedMessage;method_44866()Lnet/minecraft/network/message/ChatMessageSigner;
    • 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
    • equals

      public final boolean equals(Object object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • signedHeader

      public class_7614 signedHeader()
      Returns the value of the signedHeader record component.
      Returns:
      the value of the signedHeader record component
    • headerSignature

      public MessageSignature headerSignature()
      Returns the value of the headerSignature record component.
      Returns:
      the value of the headerSignature record component
    • signedBody

      public class_7608 signedBody()
      Returns the value of the signedBody record component.
      Returns:
      the value of the signedBody record component
    • unsignedContent

      public Optional<Text> unsignedContent()
      Returns the value of the unsignedContent record component.
      Returns:
      the value of the unsignedContent record component