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
named net/minecraft/network/message/LastSeenMessagesCollector
intermediary net/minecraft/class_7637
official xg
  • Field Details

    • acknowledgedMessages

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

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

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

      Mappings:
      Namespace Name Mixin selector
      named lastAdded Lnet/minecraft/network/message/LastSeenMessagesCollector;lastAdded:Lnet/minecraft/network/message/MessageSignatureData;
      intermediary field_40679 Lnet/minecraft/class_7637;field_40679:Lnet/minecraft/class_7469;
      official d Lxg;d:Lxk;
  • Constructor Details

    • LastSeenMessagesCollector

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

    • add

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

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

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

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

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

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