Package net.minecraft.client.gui.screens
Class ChatScreen
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.ChatScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Widget
- Direct Known Subclasses:
InBedChatScreen
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate ClientChatPreviewprivate final ChatPreviewAnimatorprivate ChatPreviewStatus(package private) CommandSuggestionsprivate Stringprivate intprivate Stringprotected EditBoxstatic final doubleprivate static final intprivate static final Componentprivate static final intprivate static final intprivate static final intprivate static final Componentprivate static final Componentprivate booleanprivate static final intprivate static final ComponentFields inherited from class net.minecraft.client.gui.screens.Screen
font, height, itemRenderer, minecraft, passEvents, renderables, title, widthFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATIONFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intprivate intchatPreviewHeight(List<FormattedCharSequence> p_232714_) private intprivate intprivate intchatPreviewTop(int p_232709_) private intprivate StylegetChatPreviewStyleAt(double p_232716_, double p_232717_) private StylegetComponentStyleAt(double p_232702_, double p_232703_) protected ComponentbooleanhandleChatInput(String p_242400_, boolean p_242161_) protected voidinit()protected voidinsertText(String p_95606_, boolean p_95607_) booleanbooleankeyPressed(int p_95591_, int p_95592_, int p_95593_) booleanmouseClicked(double p_95585_, double p_95586_, int p_95587_) booleanmouseScrolled(double p_95581_, double p_95582_, double p_95583_) voidmoveInHistory(int p_95589_) normalizeChatMessage(String p_232707_) private voidprivate Componentvoidremoved()voidvoidrenderChatPreview(PoseStack p_242432_, Component p_242318_, float p_242443_, boolean p_242189_) private voidrenderChatPreviewHighlights(PoseStack p_242454_, FormattedCharSequence p_242367_, int p_242163_, int p_242358_) private voidrequestChatMessagePreview(String p_232723_) private voidrequestCommandArgumentPreview(String p_232725_) private voidrequestPreview(String p_232721_) voidprivate booleanprivate voidsetChatLine(String p_95613_) private List<FormattedCharSequence>splitChatPreview(Component p_242266_) voidtick()private voidupdateChatPreview(String p_232719_) protected voidupdateNarrationState(NarrationElementOutput p_169238_) Methods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, shouldCloseOnEsc, triggerImmediateNarration, updateNarratedWidget, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, setInitialFocusMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
-
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
-
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
-
PREVIEW_WARNING_TOAST
-
PREVIEW_INPUT_HINT
-
TOOLTIP_MAX_WIDTH
private static final int TOOLTIP_MAX_WIDTH- See Also:
-
historyBuffer
-
historyPos
private int historyPos -
input
-
initial
-
commandSuggestions
CommandSuggestions commandSuggestions -
chatPreview
-
chatPreviewStatus
-
previewNotRequired
private boolean previewNotRequired -
chatPreviewAnimator
-
-
Constructor Details
-
ChatScreen
-
-
Method Details
-
init
protected void init() -
resize
-
removed
public void removed() -
tick
public void tick() -
onEdited
-
updateChatPreview
-
requestPreview
-
requestChatMessagePreview
-
requestCommandArgumentPreview
-
sendsChatPreviewRequests
private boolean sendsChatPreviewRequests() -
keyPressed
public boolean keyPressed(int p_95591_, int p_95592_, int p_95593_) - Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen
-
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
- Overrides:
insertTextin classScreen
-
moveInHistory
public void moveInHistory(int p_95589_) -
render
-
getDisplayedPreviewText
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
setChatLine
-
updateNarrationState
- Overrides:
updateNarrationStatein classScreen
-
renderChatPreview
-
renderChatPreviewHighlights
private void renderChatPreviewHighlights(PoseStack p_242454_, FormattedCharSequence p_242367_, int p_242163_, int p_242358_) -
getComponentStyleAt
-
getChatPreviewStyleAt
-
peekPreview
-
splitChatPreview
-
chatPreviewWidth
private int chatPreviewWidth() -
chatPreviewHeight
-
chatPreviewBottom
private int chatPreviewBottom() -
chatPreviewTop
private int chatPreviewTop(int p_232709_) -
chatPreviewLeft
private int chatPreviewLeft() -
chatPreviewRight
private int chatPreviewRight() -
handleChatInput
-
normalizeChatMessage
-
getChatPreview
-