Record Class MessageLink

java.lang.Object
java.lang.Record
net.minecraft.network.message.MessageLink
Record Components:
index -
sender -
sessionId -

public record MessageLink(int index, UUID sender, UUID sessionId) extends Record
Represents a link to the preceding message that a particular message has.
Mappings:
Namespace Name
official uf
intermediary net/minecraft/class_7826
named net/minecraft/network/message/MessageLink
official b
intermediary comp_1094
named index
official c
intermediary comp_1095
named sender
official d
intermediary comp_1096
named sessionId
  • Field Details

    • index

      private final int index
      The field for the index record component.
    • sender

      private final UUID sender
      The field for the sender record component.
    • sessionId

      private final UUID sessionId
      The field for the sessionId record component.
    • CODEC

      public static final com.mojang.serialization.Codec<MessageLink> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Luf;a:Lcom/mojang/serialization/Codec;
      intermediary field_40849 Lnet/minecraft/class_7826;field_40849:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/network/message/MessageLink;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • MessageLink

      public MessageLink(int int2, UUID uUID, UUID uUID2)
  • Method Details

    • of

      public static MessageLink of(UUID sender)
      Mappings:
      Namespace Name Mixin selector
      official a Luf;a(Ljava/util/UUID;)Luf;
      intermediary method_46319 Lnet/minecraft/class_7826;method_46319(Ljava/util/UUID;)Lnet/minecraft/class_7826;
      named of Lnet/minecraft/network/message/MessageLink;of(Ljava/util/UUID;)Lnet/minecraft/network/message/MessageLink;
    • of

      public static MessageLink of(UUID sender, UUID sessionId)
      Mappings:
      Namespace Name Mixin selector
      official a Luf;a(Ljava/util/UUID;Ljava/util/UUID;)Luf;
      intermediary method_46320 Lnet/minecraft/class_7826;method_46320(Ljava/util/UUID;Ljava/util/UUID;)Lnet/minecraft/class_7826;
      named of Lnet/minecraft/network/message/MessageLink;of(Ljava/util/UUID;Ljava/util/UUID;)Lnet/minecraft/network/message/MessageLink;
    • update

      public void update(SignatureUpdatable.SignatureUpdater updater) throws SignatureException
      Throws:
      SignatureException
      Mappings:
      Namespace Name Mixin selector
      official a Luf;a(Lasg$a;)V
      intermediary method_46318 Lnet/minecraft/class_7826;method_46318(Lnet/minecraft/class_7498$class_7499;)V
      named update Lnet/minecraft/network/message/MessageLink;update(Lnet/minecraft/network/encryption/SignatureUpdatable$SignatureUpdater;)V
    • linksTo

      public boolean linksTo(MessageLink preceding)
      Returns whether this link links to the preceding link.

      For the link to be considered valid, the two must have the same sender and session ID, and the newer link's index must be above the preceding link's index.

      Returns:
      whether this link links to the preceding link
      Mappings:
      Namespace Name Mixin selector
      official a Luf;a(Luf;)Z
      intermediary method_46321 Lnet/minecraft/class_7826;method_46321(Lnet/minecraft/class_7826;)Z
      named linksTo Lnet/minecraft/network/message/MessageLink;linksTo(Lnet/minecraft/network/message/MessageLink;)Z
    • next

      @Nullable public @Nullable MessageLink next()
      Returns the next link used by the message's succeeding message.

      This can return null in an extremely rare case, where the index is about to overflow.

      Returns:
      the next link used by the message's succeeding message
      Mappings:
      Namespace Name Mixin selector
      official a Luf;a()Luf;
      intermediary method_46317 Lnet/minecraft/class_7826;method_46317()Lnet/minecraft/class_7826;
      named next Lnet/minecraft/network/message/MessageLink;next()Lnet/minecraft/network/message/MessageLink;
    • 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.
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • sender

      public UUID sender()
      Returns the value of the sender record component.
      Returns:
      the value of the sender record component
    • sessionId

      public UUID sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component