Class MessageChain

java.lang.Object
net.minecraft.network.message.MessageChain

public class MessageChain extends Object
A class for handling the "message chain".

A message chain (since 1.19.3) is implemented using an integer that is incremented for each message, called "index". MessageLink represents the link that a particular message has.

Clients signing a message with its preceding message's index is called "packing", and the server creating a signed message with its preceding message's index is called "unpacking". Unpacked messages can then be verified to check the chain's legitimacy.

See Also:
Mappings:
Namespace Name
official vz
intermediary net/minecraft/class_7610
named net/minecraft/network/message/MessageChain
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lvz;a:Lorg/slf4j/Logger;
      intermediary field_40691 Lnet/minecraft/class_7610;field_40691:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/network/message/MessageChain;LOGGER:Lorg/slf4j/Logger;
    • lastTimestamp

      private Instant lastTimestamp
      Mappings:
      Namespace Name Mixin selector
      official c Lvz;c:Ljava/time/Instant;
      intermediary field_47703 Lnet/minecraft/class_7610;field_47703:Ljava/time/Instant;
      named lastTimestamp Lnet/minecraft/network/message/MessageChain;lastTimestamp:Ljava/time/Instant;
  • Constructor Details

    • MessageChain

      public MessageChain(UUID sender, UUID sessionId)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lvz;<init>(Ljava/util/UUID;Ljava/util/UUID;)V
      intermediary <init> Lnet/minecraft/class_7610;<init>(Ljava/util/UUID;Ljava/util/UUID;)V
      named <init> Lnet/minecraft/network/message/MessageChain;<init>(Ljava/util/UUID;Ljava/util/UUID;)V
  • Method Details

    • getPacker

      public MessageChain.Packer getPacker(Signer signer)
      Mappings:
      Namespace Name Mixin selector
      official a Lvz;a(Lavd;)Lvz$c;
      intermediary method_44880 Lnet/minecraft/class_7610;method_44880(Lnet/minecraft/class_7501;)Lnet/minecraft/class_7610$class_7612;
      named getPacker Lnet/minecraft/network/message/MessageChain;getPacker(Lnet/minecraft/network/encryption/Signer;)Lnet/minecraft/network/message/MessageChain$Packer;
    • getUnpacker

      public MessageChain.Unpacker getUnpacker(PlayerPublicKey playerPublicKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lvz;a(Lcfl;)Lvz$b;
      intermediary method_44874 Lnet/minecraft/class_7610;method_44874(Lnet/minecraft/class_7428;)Lnet/minecraft/class_7610$class_7611;
      named getUnpacker Lnet/minecraft/network/message/MessageChain;getUnpacker(Lnet/minecraft/network/encryption/PlayerPublicKey;)Lnet/minecraft/network/message/MessageChain$Unpacker;
    • nextLink

      @Nullable private @Nullable MessageLink nextLink()
      Mappings:
      Namespace Name Mixin selector
      official a Lvz;a()Lwa;
      intermediary method_46310 Lnet/minecraft/class_7610;method_46310()Lnet/minecraft/class_7826;
      named nextLink Lnet/minecraft/network/message/MessageChain;nextLink()Lnet/minecraft/network/message/MessageLink;