Record Class ChatMessageS2CPacket

java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.ChatMessageS2CPacket
Record Components:
content -
type -
sender -
timeStamp -
saltSignature -
All Implemented Interfaces:
Packet<ClientPlayPacketListener>

public record ChatMessageS2CPacket(Text content, MessageType type, ChatMessageSender sender, Instant timeStamp, NetworkEncryptionUtils.SignatureData saltSignature) extends Record implements Packet<ClientPlayPacketListener>
Mappings:
Namespace Name
official tx
intermediary net/minecraft/class_7438
named net/minecraft/network/packet/s2c/play/ChatMessageS2CPacket
official a
intermediary comp_758
named content
official b
intermediary comp_759
named type
official c
intermediary comp_760
named sender
official d
intermediary comp_761
named timeStamp
official e
intermediary comp_762
named saltSignature
  • Field Details

    • content

      private final Text content
      The field for the content record component.
    • type

      private final MessageType type
      The field for the type record component.
    • sender

      private final ChatMessageSender sender
      The field for the sender record component.
    • timeStamp

      private final Instant timeStamp
      The field for the timeStamp record component.
    • saltSignature

      private final NetworkEncryptionUtils.SignatureData saltSignature
      The field for the saltSignature record component.
    • field_39085

      private static final Duration field_39085
      Mappings:
      Namespace Name Mixin selector
      official f Ltx;f:Ljava/time/Duration;
      intermediary field_39085 Lnet/minecraft/class_7438;field_39085:Ljava/time/Duration;
      named field_39085 Lnet/minecraft/network/packet/s2c/play/ChatMessageS2CPacket;field_39085:Ljava/time/Duration;
  • Constructor Details

    • ChatMessageS2CPacket

      public ChatMessageS2CPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ltx;<init>(Lqn;)V
      intermediary <init> Lnet/minecraft/class_7438;<init>(Lnet/minecraft/class_2540;)V
      named <init> Lnet/minecraft/network/packet/s2c/play/ChatMessageS2CPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
    • ChatMessageS2CPacket

      public ChatMessageS2CPacket(Text text, MessageType messageType, ChatMessageSender chatMessageSender, Instant instant, NetworkEncryptionUtils.SignatureData signatureData)
  • Method Details

    • write

      public void write(PacketByteBuf buf)
      Specified by:
      write in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lry;a(Lqn;)V
      intermediary method_11052 Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)V
      named write Lnet/minecraft/network/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
    • apply

      public void apply(ClientPlayPacketListener clientPlayPacketListener)
      Specified by:
      apply in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Ltx;a(Lsb;)V
      intermediary method_43629 Lnet/minecraft/class_7438;method_43629(Lnet/minecraft/class_2602;)V
      named apply Lnet/minecraft/network/packet/s2c/play/ChatMessageS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
    • isWritingErrorSkippable

      public boolean isWritingErrorSkippable()
      Returns whether a throwable in writing of this packet allows the connection to simply skip the packet's sending than disconnecting.
      Specified by:
      isWritingErrorSkippable in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lry;a()Z
      intermediary method_11051 Lnet/minecraft/class_2596;method_11051()Z
      named isWritingErrorSkippable Lnet/minecraft/network/Packet;isWritingErrorSkippable()Z
    • isSignatureValid

      public boolean isSignatureValid(PlayerPublicKey.class_7429 class_7429)
      Mappings:
      Namespace Name Mixin selector
      official a Ltx;a(Lbrv$a;)Z
      intermediary method_43627 Lnet/minecraft/class_7438;method_43627(Lnet/minecraft/class_7428$class_7429;)Z
      named isSignatureValid Lnet/minecraft/network/packet/s2c/play/ChatMessageS2CPacket;isSignatureValid(Lnet/minecraft/network/encryption/PlayerPublicKey$class_7429;)Z
    • method_43630

      private Instant method_43630()
      Mappings:
      Namespace Name Mixin selector
      official g Ltx;g()Ljava/time/Instant;
      intermediary method_43630 Lnet/minecraft/class_7438;method_43630()Ljava/time/Instant;
      named method_43630 Lnet/minecraft/network/packet/s2c/play/ChatMessageS2CPacket;method_43630()Ljava/time/Instant;
    • method_43628

      public boolean method_43628(Instant sendingTime)
      Mappings:
      Namespace Name Mixin selector
      official a Ltx;a(Ljava/time/Instant;)Z
      intermediary method_43628 Lnet/minecraft/class_7438;method_43628(Ljava/time/Instant;)Z
      named method_43628 Lnet/minecraft/network/packet/s2c/play/ChatMessageS2CPacket;method_43628(Ljava/time/Instant;)Z
    • 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.
    • content

      public Text content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • type

      public MessageType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • sender

      public ChatMessageSender sender()
      Returns the value of the sender record component.
      Returns:
      the value of the sender record component
    • timeStamp

      public Instant timeStamp()
      Returns the value of the timeStamp record component.
      Returns:
      the value of the timeStamp record component
    • saltSignature

      public NetworkEncryptionUtils.SignatureData saltSignature()
      Returns the value of the saltSignature record component.
      Returns:
      the value of the saltSignature record component