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:
    • MESSAGE_NOT_FOUND

      private static final int MESSAGE_NOT_FOUND
      See Also:
    • MESSAGE_INDENT

      private static final int MESSAGE_INDENT
      See Also:
    • MESSAGE_TAG_MARGIN_LEFT

      private static final int MESSAGE_TAG_MARGIN_LEFT
      See Also:
    • minecraft

      private final Minecraft minecraft
    • recentChat

      private final List<String> recentChat
    • allMessages

      private final List<GuiMessage> allMessages
    • trimmedMessages

      private final List<GuiMessage.Line> trimmedMessages
    • chatScrollbarPos

      private int chatScrollbarPos
    • newMessageSinceScroll

      private boolean newMessageSinceScroll
  • Constructor Details

    • ChatComponent

      public ChatComponent(Minecraft p_93768_)
  • Method Details

    • render

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

      private void drawTagIcon(PoseStack p_240586_, int p_240593_, int p_240610_, GuiMessageTag.Icon p_240605_)
    • getTagIconLeft

      private int getTagIconLeft(GuiMessage.Line p_240622_)
    • 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

      public void addMessage(Component p_241484_, @Nullable MessageSignature p_241323_, @Nullable GuiMessageTag p_241297_)
    • logChatMessage

      private void logChatMessage(Component p_242919_, @Nullable GuiMessageTag p_242840_)
    • addMessage

      private void addMessage(Component p_240562_, @Nullable MessageSignature p_241566_, int p_240583_, @Nullable GuiMessageTag p_240624_, boolean p_240558_)
    • deleteMessage

      public void deleteMessage(MessageSignature p_241324_)
    • rescaleChat

      public void rescaleChat()
    • refreshTrimmedMessage

      private void refreshTrimmedMessage()
    • 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_)
    • getMessageTagAt

      @Nullable public GuiMessageTag getMessageTagAt(double p_240576_, double p_240554_)
    • hasSelectedMessageTag

      private boolean hasSelectedMessageTag(double p_240619_, GuiMessage.Line p_240547_, GuiMessageTag p_240637_)
    • screenToChatX

      private double screenToChatX(double p_240580_)
    • screenToChatY

      private double screenToChatY(double p_240548_)
    • getMessageIndexAt

      private int getMessageIndexAt(double p_240641_)
    • getFocusedChat

      @Nullable public ChatScreen getFocusedChat()
    • isChatFocused

      private boolean isChatFocused()
    • 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_)
    • defaultUnfocusedPct

      public static double defaultUnfocusedPct()
    • getLinesPerPage

      public int getLinesPerPage()
    • getLineHeight

      private int getLineHeight()