Class ChatComponent

java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.ChatComponent

public class ChatComponent extends GuiComponent
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MAX_CHAT_HISTORY

      private static final int MAX_CHAT_HISTORY
      See Also:
    • minecraft

      private final Minecraft minecraft
    • recentChat

      private final List<String> recentChat
    • allMessages

      private final List<GuiMessage<Component>> allMessages
    • trimmedMessages

      private final List<GuiMessage<FormattedCharSequence>> trimmedMessages
    • chatQueue

      private final Deque<Component> chatQueue
    • chatScrollbarPos

      private int chatScrollbarPos
    • newMessageSinceScroll

      private boolean newMessageSinceScroll
    • lastMessage

      private long lastMessage
  • Constructor Details

    • ChatComponent

      public ChatComponent(Minecraft p_93768_)
  • Method Details

    • render

      public void render(PoseStack p_93781_, int p_93782_)
    • isChatHidden

      private boolean isChatHidden()
    • getTimeFactor

      private static double getTimeFactor(int p_93776_)
    • clearMessages

      public void clearMessages(boolean p_93796_)
    • addMessage

      public void addMessage(Component p_93786_)
    • addMessage

      private void addMessage(Component p_93788_, int p_93789_)
    • addMessage

      private void addMessage(Component p_93791_, int p_93792_, int p_93793_, boolean p_93794_)
    • rescaleChat

      public void rescaleChat()
    • getRecentChat

      public List<String> getRecentChat()
    • addRecentChat

      public void addRecentChat(String p_93784_)
    • resetChatScroll

      public void resetChatScroll()
    • scrollChat

      public void scrollChat(int p_205361_)
    • handleChatQueueClicked

      public boolean handleChatQueueClicked(double p_93773_, double p_93774_)
    • getClickedComponentStyleAt

      @Nullable public Style getClickedComponentStyleAt(double p_93801_, double p_93802_)
    • isChatFocused

      private boolean isChatFocused()
    • removeById

      private void removeById(int p_93804_)
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getScale

      public double getScale()
    • getWidth

      public static int getWidth(double p_93799_)
    • getHeight

      public static int getHeight(double p_93812_)
    • getLinesPerPage

      public int getLinesPerPage()
    • getChatRateMillis

      private long getChatRateMillis()
    • processPendingMessages

      private void processPendingMessages()
    • enqueueMessage

      public void enqueueMessage(Component p_93809_)