Record Class MessageBody

java.lang.Object
java.lang.Record
net.minecraft.network.message.MessageBody
Record Components:
content -
timestamp -
salt -
lastSeenMessages -

public record MessageBody(String content, Instant timestamp, long salt, LastSeenMessageList lastSeenMessages) extends Record
A body of a message, including the content, timestamp, salt used for the digest (the hashed body), and the list of players' "last seen messages". Other bits of information, such as sender, are included directly in the packet.
Mappings:
Namespace Name
named net/minecraft/network/message/MessageBody
intermediary net/minecraft/class_7608
official yi
named content
intermediary comp_929
official b
named timestamp
intermediary comp_930
official c
named salt
intermediary comp_931
official d
named lastSeenMessages
intermediary comp_932
official e
  • Field Details

    • content

      private final String content
      The field for the content record component.
    • timestamp

      private final Instant timestamp
      The field for the timestamp record component.
    • salt

      private final long salt
      The field for the salt record component.
    • lastSeenMessages

      private final LastSeenMessageList lastSeenMessages
      The field for the lastSeenMessages record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<MessageBody> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/network/message/MessageBody;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_40847 Lnet/minecraft/class_7608;field_40847:Lcom/mojang/serialization/MapCodec;
      official a Lyi;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • ofUnsigned

      public static MessageBody ofUnsigned(String content)
      Mappings:
      Namespace Name Mixin selector
      named ofUnsigned Lnet/minecraft/network/message/MessageBody;ofUnsigned(Ljava/lang/String;)Lnet/minecraft/network/message/MessageBody;
      intermediary method_46305 Lnet/minecraft/class_7608;method_46305(Ljava/lang/String;)Lnet/minecraft/class_7608;
      official a Lyi;a(Ljava/lang/String;)Lyi;
    • update

      public void update(SignatureUpdatable.SignatureUpdater updater) throws SignatureException
      Throws:
      SignatureException
      Mappings:
      Namespace Name Mixin selector
      named update Lnet/minecraft/network/message/MessageBody;update(Lnet/minecraft/network/encryption/SignatureUpdatable$SignatureUpdater;)V
      intermediary method_46304 Lnet/minecraft/class_7608;method_46304(Lnet/minecraft/class_7498$class_7499;)V
      official a Lyi;a(Lazl$a;)V
    • toSerialized

      public MessageBody.Serialized toSerialized(MessageSignatureStorage storage)
      Mappings:
      Namespace Name Mixin selector
      named toSerialized Lnet/minecraft/network/message/MessageBody;toSerialized(Lnet/minecraft/network/message/MessageSignatureStorage;)Lnet/minecraft/network/message/MessageBody$Serialized;
      intermediary method_46306 Lnet/minecraft/class_7608;method_46306(Lnet/minecraft/class_7561;)Lnet/minecraft/class_7608$class_7824;
      official a Lyi;a(Lyc;)Lyi$a;
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • content

      public String content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • salt

      public long salt()
      Returns the value of the salt record component.
      Returns:
      the value of the salt record component
    • lastSeenMessages

      public LastSeenMessageList lastSeenMessages()
      Returns the value of the lastSeenMessages record component.
      Returns:
      the value of the lastSeenMessages record component