Class LastSeenMessagesCollector

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

public class LastSeenMessagesCollector extends Object
Collects the message that are last seen by a client.

The message, along with the "last received" message, forms an "acknowledgment" of received messages. They are sent to the server when the client has enough messages received or when they send a message.

See Also:
Implementation Note:
The maximum amount of message entries are specified in the constructor. The vanilla clients collect 5 entries. Calling add(MessageSignatureData, boolean) adds the message to the beginning of the entries list, and evicts the oldest message. If there are entries with the same sender profile ID, the older entry will be replaced with null instead of filling the hole.
Mappings:
Namespace Name
official ts
intermediary net/minecraft/class_7637
named net/minecraft/network/message/LastSeenMessagesCollector
  • Field Details

    • acknowledgedMessages

      private final AcknowledgedMessage[] acknowledgedMessages
      Mappings:
      Namespace Name Mixin selector
      official a Lts;a:[Ltu;
      intermediary field_40676 Lnet/minecraft/class_7637;field_40676:[Lnet/minecraft/class_7817;
      named acknowledgedMessages Lnet/minecraft/network/message/LastSeenMessagesCollector;acknowledgedMessages:[Lnet/minecraft/network/message/AcknowledgedMessage;
    • nextIndex

      private int nextIndex
      Mappings:
      Namespace Name Mixin selector
      official b Lts;b:I
      intermediary field_40677 Lnet/minecraft/class_7637;field_40677:I
      named nextIndex Lnet/minecraft/network/message/LastSeenMessagesCollector;nextIndex:I
    • messageCount

      private int messageCount
      Mappings:
      Namespace Name Mixin selector
      official c Lts;c:I
      intermediary field_40678 Lnet/minecraft/class_7637;field_40678:I
      named messageCount Lnet/minecraft/network/message/LastSeenMessagesCollector;messageCount:I
    • lastAdded

      @Nullable private @Nullable MessageSignatureData lastAdded
      Mappings:
      Namespace Name Mixin selector
      official d Lts;d:Ltw;
      intermediary field_40679 Lnet/minecraft/class_7637;field_40679:Lnet/minecraft/class_7469;
      named lastAdded Lnet/minecraft/network/message/LastSeenMessagesCollector;lastAdded:Lnet/minecraft/network/message/MessageSignatureData;
  • Constructor Details

    • LastSeenMessagesCollector

      public LastSeenMessagesCollector(int size)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lts;<init>(I)V
      intermediary <init> Lnet/minecraft/class_7637;<init>(I)V
      named <init> Lnet/minecraft/network/message/LastSeenMessagesCollector;<init>(I)V
  • Method Details

    • add

      public boolean add(MessageSignatureData signature, boolean displayed)
      Mappings:
      Namespace Name Mixin selector
      official a Lts;a(Ltw;Z)Z
      intermediary method_46265 Lnet/minecraft/class_7637;method_46265(Lnet/minecraft/class_7469;Z)Z
      named add Lnet/minecraft/network/message/LastSeenMessagesCollector;add(Lnet/minecraft/network/message/MessageSignatureData;Z)Z
    • add

      private void add(@Nullable @Nullable AcknowledgedMessage message)
      Mappings:
      Namespace Name Mixin selector
      official a Lts;a(Ltu;)V
      intermediary method_46263 Lnet/minecraft/class_7637;method_46263(Lnet/minecraft/class_7817;)V
      named add Lnet/minecraft/network/message/LastSeenMessagesCollector;add(Lnet/minecraft/network/message/AcknowledgedMessage;)V
    • remove

      public void remove(MessageSignatureData signature)
      Mappings:
      Namespace Name Mixin selector
      official a Lts;a(Ltw;)V
      intermediary method_46264 Lnet/minecraft/class_7637;method_46264(Lnet/minecraft/class_7469;)V
      named remove Lnet/minecraft/network/message/LastSeenMessagesCollector;remove(Lnet/minecraft/network/message/MessageSignatureData;)V
    • resetMessageCount

      public int resetMessageCount()
      Mappings:
      Namespace Name Mixin selector
      official a Lts;a()I
      intermediary method_46262 Lnet/minecraft/class_7637;method_46262()I
      named resetMessageCount Lnet/minecraft/network/message/LastSeenMessagesCollector;resetMessageCount()I
    • collect

      Mappings:
      Namespace Name Mixin selector
      official b Lts;b()Lts$a;
      intermediary method_46266 Lnet/minecraft/class_7637;method_46266()Lnet/minecraft/class_7637$class_7816;
      named collect Lnet/minecraft/network/message/LastSeenMessagesCollector;collect()Lnet/minecraft/network/message/LastSeenMessagesCollector$LastSeenMessages;
    • getMessageCount

      public int getMessageCount()
      Mappings:
      Namespace Name Mixin selector
      official c Lts;c()I
      intermediary method_46267 Lnet/minecraft/class_7637;method_46267()I
      named getMessageCount Lnet/minecraft/network/message/LastSeenMessagesCollector;getMessageCount()I