Class ChatScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Widget
Direct Known Subclasses:
InBedChatScreen

public class ChatScreen extends Screen
  • Field Details

    • CHAT_SIGNING_PENDING_INDICATOR_COLOR

      private static final int CHAT_SIGNING_PENDING_INDICATOR_COLOR
      See Also:
    • CHAT_SIGNING_READY_INDICATOR_COLOR

      private static final int CHAT_SIGNING_READY_INDICATOR_COLOR
      See Also:
    • PREVIEW_HIGHLIGHT_COLOR

      private static final int PREVIEW_HIGHLIGHT_COLOR
      See Also:
    • MOUSE_SCROLL_SPEED

      public static final double MOUSE_SCROLL_SPEED
      See Also:
    • USAGE_TEXT

      private static final Component USAGE_TEXT
    • PREVIEW_MARGIN_SIDES

      private static final int PREVIEW_MARGIN_SIDES
      See Also:
    • PREVIEW_PADDING

      private static final int PREVIEW_PADDING
      See Also:
    • PREVIEW_MARGIN_BOTTOM

      private static final int PREVIEW_MARGIN_BOTTOM
      See Also:
    • PREVIEW_WARNING_TITLE

      private static final Component PREVIEW_WARNING_TITLE
    • PREVIEW_WARNING_TOAST

      private static final Component PREVIEW_WARNING_TOAST
    • PREVIEW_INPUT_HINT

      private static final Component PREVIEW_INPUT_HINT
    • TOOLTIP_MAX_WIDTH

      private static final int TOOLTIP_MAX_WIDTH
      See Also:
    • historyBuffer

      private String historyBuffer
    • historyPos

      private int historyPos
    • input

      protected EditBox input
    • initial

      private String initial
    • commandSuggestions

      CommandSuggestions commandSuggestions
    • chatPreview

      private ClientChatPreview chatPreview
    • chatPreviewStatus

      private ChatPreviewStatus chatPreviewStatus
    • previewNotRequired

      private boolean previewNotRequired
    • chatPreviewAnimator

      private final ChatPreviewAnimator chatPreviewAnimator
  • Constructor Details

    • ChatScreen

      public ChatScreen(String p_95579_)
  • Method Details

    • init

      protected void init()
      Overrides:
      init in class Screen
    • resize

      public void resize(Minecraft p_95600_, int p_95601_, int p_95602_)
      Overrides:
      resize in class Screen
    • removed

      public void removed()
      Overrides:
      removed in class Screen
    • tick

      public void tick()
      Overrides:
      tick in class Screen
    • onEdited

      private void onEdited(String p_95611_)
    • updateChatPreview

      private void updateChatPreview(String p_232719_)
    • requestPreview

      private void requestPreview(String p_232721_)
    • requestChatMessagePreview

      private void requestChatMessagePreview(String p_232723_)
    • requestCommandArgumentPreview

      private void requestCommandArgumentPreview(String p_232725_)
    • sendsChatPreviewRequests

      private boolean sendsChatPreviewRequests()
    • keyPressed

      public boolean keyPressed(int p_95591_, int p_95592_, int p_95593_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • mouseScrolled

      public boolean mouseScrolled(double p_95581_, double p_95582_, double p_95583_)
    • mouseClicked

      public boolean mouseClicked(double p_95585_, double p_95586_, int p_95587_)
    • insertText

      protected void insertText(String p_95606_, boolean p_95607_)
      Overrides:
      insertText in class Screen
    • moveInHistory

      public void moveInHistory(int p_95589_)
    • render

      public void render(PoseStack p_95595_, int p_95596_, int p_95597_, float p_95598_)
      Specified by:
      render in interface Widget
      Overrides:
      render in class Screen
    • getDisplayedPreviewText

      @Nullable protected Component getDisplayedPreviewText()
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class Screen
    • setChatLine

      private void setChatLine(String p_95613_)
    • updateNarrationState

      protected void updateNarrationState(NarrationElementOutput p_169238_)
      Overrides:
      updateNarrationState in class Screen
    • renderChatPreview

      public void renderChatPreview(PoseStack p_242432_, Component p_242318_, float p_242443_, boolean p_242189_)
    • renderChatPreviewHighlights

      private void renderChatPreviewHighlights(PoseStack p_242454_, FormattedCharSequence p_242367_, int p_242163_, int p_242358_)
    • getComponentStyleAt

      @Nullable private Style getComponentStyleAt(double p_232702_, double p_232703_)
    • getChatPreviewStyleAt

      @Nullable private Style getChatPreviewStyleAt(double p_232716_, double p_232717_)
    • peekPreview

      @Nullable private Component peekPreview()
    • splitChatPreview

      private List<FormattedCharSequence> splitChatPreview(Component p_242266_)
    • chatPreviewWidth

      private int chatPreviewWidth()
    • chatPreviewHeight

      private int chatPreviewHeight(List<FormattedCharSequence> p_232714_)
    • chatPreviewBottom

      private int chatPreviewBottom()
    • chatPreviewTop

      private int chatPreviewTop(int p_232709_)
    • chatPreviewLeft

      private int chatPreviewLeft()
    • chatPreviewRight

      private int chatPreviewRight()
    • handleChatInput

      public boolean handleChatInput(String p_242400_, boolean p_242161_)
    • normalizeChatMessage

      public String normalizeChatMessage(String p_232707_)
    • getChatPreview

      public ClientChatPreview getChatPreview()