Package net.minecraft.client.gui.hud
Class ChatHud
java.lang.Object
net.minecraft.client.gui.hud.ChatHud
Responsible for rendering various game messages such as chat messages or
join/leave messages.
- See Also:
- Mappings:
Namespace Name named net/minecraft/client/gui/hud/ChatHudintermediary net/minecraft/class_338official ghm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enumstatic classstatic final recordprivate static classprivate static classprivate static interfaceprivate static interfaceprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Style(package private) final MinecraftClientprivate static final Textprivate ChatHud.Draftstatic final Identifierprivate static final intstatic final intprivate static final intprivate booleanprivate static final Loggerprivate static final intprivate final ArrayListDeque<String> private final List<ChatHudLine> private static final intprivate static final intprivate final List<ChatHud.RemovalQueuedMessage> private ChatScreenprivate intprivate final List<ChatHudLine.Visible> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddMessage(ChatHudLine message) voidaddMessage(Text message) voidaddMessage(Text message, @Nullable MessageSignatureData signatureData, @Nullable MessageIndicator indicator) voidaddToMessageHistory(String message) private voidaddVisibleMessage(ChatHudLine message) voidclear(boolean clearHistory) private ChatHudLinecreateRemovalMarker(ChatHudLine original) <T extends ChatScreen>
TcreateScreen(ChatHud.ChatMethod method, ChatScreen.Factory<T> factory) voidprivate intforEachVisibleLine(ChatHud.OpacityRule opacityRule, ChatHud.LineConsumer lineConsumer) Returns the number of lines accepted bylineConsumer.private doublestatic doubleprivate intstatic intgetHeight(double heightOption) private intintprivate intgetWidth()static intgetWidth(double widthOption) booleanprivate booleanprivate voidlogChatMessage(ChatHudLine message) private @Nullable ChatHud.RemovalQueuedMessagequeueForRemoval(MessageSignatureData signature) private voidrefresh()voidremoveMessage(MessageSignatureData signature) @Nullable ChatScreenvoidrender(TextConsumer textConsumer, int windowHeight, int currentTick, boolean expanded) voidrender(DrawContext context, TextRenderer textRenderer, int currentTick, int mouseX, int mouseY, boolean expanded) private voidrender(ChatHud.Backend drawer, int windowHeight, int currentTick, boolean expanded) voidreset()voidvoidvoidvoidscroll(int scroll) voidsetClientScreen(ChatHud.ChatMethod method, ChatScreen.Factory<?> factory) voidprivate voidvoid
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/gui/hud/ChatHud;LOGGER:Lorg/slf4j/Logger;intermediary field_2065Lnet/minecraft/class_338;field_2065:Lorg/slf4j/Logger;official cLghm;c:Lorg/slf4j/Logger;
-
MAX_MESSAGES
private static final int MAX_MESSAGES- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_MESSAGESLnet/minecraft/client/gui/hud/ChatHud;MAX_MESSAGES:Iintermediary field_32180Lnet/minecraft/class_338;field_32180:Iofficial dLghm;d:I
-
field_39772
private static final int field_39772- See Also:
- Mappings:
Namespace Name Mixin selector named field_39772Lnet/minecraft/client/gui/hud/ChatHud;field_39772:Iintermediary field_39772Lnet/minecraft/class_338;field_39772:Iofficial eLghm;e:I
-
OFFSET_FROM_BOTTOM
private static final int OFFSET_FROM_BOTTOM- See Also:
- Mappings:
Namespace Name Mixin selector named OFFSET_FROM_BOTTOMLnet/minecraft/client/gui/hud/ChatHud;OFFSET_FROM_BOTTOM:Iintermediary field_40389Lnet/minecraft/class_338;field_40389:Iofficial fLghm;f:I
-
field_63864
private static final int field_63864- See Also:
- Mappings:
Namespace Name Mixin selector named field_63864Lnet/minecraft/client/gui/hud/ChatHud;field_63864:Iintermediary field_63864Lnet/minecraft/class_338;field_63864:Iofficial gLghm;g:I
-
REMOVAL_QUEUE_TICKS
private static final int REMOVAL_QUEUE_TICKS- See Also:
- Mappings:
Namespace Name Mixin selector named REMOVAL_QUEUE_TICKSLnet/minecraft/client/gui/hud/ChatHud;REMOVAL_QUEUE_TICKS:Iintermediary field_40390Lnet/minecraft/class_338;field_40390:Iofficial hLghm;h:I
-
DELETED_MARKER_TEXT
- Mappings:
Namespace Name Mixin selector named DELETED_MARKER_TEXTLnet/minecraft/client/gui/hud/ChatHud;DELETED_MARKER_TEXT:Lnet/minecraft/text/Text;intermediary field_40391Lnet/minecraft/class_338;field_40391:Lnet/minecraft/class_2561;official iLghm;i:Lyi;
-
field_63862
public static final int field_63862- See Also:
- Mappings:
Namespace Name Mixin selector named field_63862Lnet/minecraft/client/gui/hud/ChatHud;field_63862:Iintermediary field_63862Lnet/minecraft/class_338;field_63862:Iofficial aLghm;a:I
-
EXPAND_CHAT_QUEUE_ID
- Mappings:
Namespace Name Mixin selector named EXPAND_CHAT_QUEUE_IDLnet/minecraft/client/gui/hud/ChatHud;EXPAND_CHAT_QUEUE_ID:Lnet/minecraft/util/Identifier;intermediary field_63863Lnet/minecraft/class_338;field_63863:Lnet/minecraft/class_2960;official bLghm;b:Lamu;
-
CHAT_QUEUE_STYLE
- Mappings:
Namespace Name Mixin selector named CHAT_QUEUE_STYLELnet/minecraft/client/gui/hud/ChatHud;CHAT_QUEUE_STYLE:Lnet/minecraft/text/Style;intermediary field_63865Lnet/minecraft/class_338;field_63865:Lnet/minecraft/class_2583;official jLghm;j:Lzg;
-
client
- Mappings:
Namespace Name Mixin selector named clientLnet/minecraft/client/gui/hud/ChatHud;client:Lnet/minecraft/client/MinecraftClient;intermediary field_2062Lnet/minecraft/class_338;field_2062:Lnet/minecraft/class_310;official kLghm;k:Lgds;
-
messageHistory
- Mappings:
Namespace Name Mixin selector named messageHistoryLnet/minecraft/client/gui/hud/ChatHud;messageHistory:Lnet/minecraft/util/collection/ArrayListDeque;intermediary field_2063Lnet/minecraft/class_338;field_2063:Lnet/minecraft/class_8623;official lLghm;l:Lben;
-
messages
- Mappings:
Namespace Name Mixin selector named messagesLnet/minecraft/client/gui/hud/ChatHud;messages:Ljava/util/List;intermediary field_2061Lnet/minecraft/class_338;field_2061:Ljava/util/List;official mLghm;m:Ljava/util/List;
-
visibleMessages
- Mappings:
Namespace Name Mixin selector named visibleMessagesLnet/minecraft/client/gui/hud/ChatHud;visibleMessages:Ljava/util/List;intermediary field_2064Lnet/minecraft/class_338;field_2064:Ljava/util/List;official nLghm;n:Ljava/util/List;
-
scrolledLines
private int scrolledLines- Mappings:
Namespace Name Mixin selector named scrolledLinesLnet/minecraft/client/gui/hud/ChatHud;scrolledLines:Iintermediary field_2066Lnet/minecraft/class_338;field_2066:Iofficial oLghm;o:I
-
hasUnreadNewMessages
private boolean hasUnreadNewMessages- Mappings:
Namespace Name Mixin selector named hasUnreadNewMessagesLnet/minecraft/client/gui/hud/ChatHud;hasUnreadNewMessages:Zintermediary field_2067Lnet/minecraft/class_338;field_2067:Zofficial pLghm;p:Z
-
draft
- Mappings:
Namespace Name Mixin selector named draftLnet/minecraft/client/gui/hud/ChatHud;draft:Lnet/minecraft/client/gui/hud/ChatHud$Draft;intermediary field_62002Lnet/minecraft/class_338;field_62002:Lnet/minecraft/class_338$class_11733;official qLghm;q:Lghm$f;
-
screen
- Mappings:
Namespace Name Mixin selector named screenLnet/minecraft/client/gui/hud/ChatHud;screen:Lnet/minecraft/client/gui/screen/ChatScreen;intermediary field_62003Lnet/minecraft/class_338;field_62003:Lnet/minecraft/class_408;official rLghm;r:Lgpg;
-
removalQueue
- Mappings:
Namespace Name Mixin selector named removalQueueLnet/minecraft/client/gui/hud/ChatHud;removalQueue:Ljava/util/List;intermediary field_40392Lnet/minecraft/class_338;field_40392:Ljava/util/List;official sLghm;s:Ljava/util/List;
-
-
Constructor Details
-
ChatHud
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/gui/hud/ChatHud;<init>(Lnet/minecraft/client/MinecraftClient;)Vintermediary <init>Lnet/minecraft/class_338;<init>(Lnet/minecraft/class_310;)Vofficial <init>Lghm;<init>(Lgds;)V
-
-
Method Details
-
tickRemovalQueueIfExists
public void tickRemovalQueueIfExists()- Mappings:
Namespace Name Mixin selector named tickRemovalQueueIfExistsLnet/minecraft/client/gui/hud/ChatHud;tickRemovalQueueIfExists()Vintermediary method_45584Lnet/minecraft/class_338;method_45584()Vofficial aLghm;a()V
-
forEachVisibleLine
Returns the number of lines accepted bylineConsumer.- Returns:
- the number of lines accepted by
lineConsumer - Mappings:
Namespace Name Mixin selector named forEachVisibleLineLnet/minecraft/client/gui/hud/ChatHud;forEachVisibleLine(Lnet/minecraft/client/gui/hud/ChatHud$OpacityRule;Lnet/minecraft/client/gui/hud/ChatHud$LineConsumer;)Iintermediary method_71990Lnet/minecraft/class_338;method_71990(Lnet/minecraft/class_338$class_12232;Lnet/minecraft/class_338$class_11511;)Iofficial aLghm;a(Lghm$a;Lghm$h;)I
-
render
public void render(DrawContext context, TextRenderer textRenderer, int currentTick, int mouseX, int mouseY, boolean expanded) - Mappings:
Namespace Name Mixin selector named renderLnet/minecraft/client/gui/hud/ChatHud;render(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/font/TextRenderer;IIIZ)Vintermediary method_75804Lnet/minecraft/class_338;method_75804(Lnet/minecraft/class_332;Lnet/minecraft/class_327;IIIZ)Vofficial aLghm;a(Lggy;Lggv;IIIZ)V
-
render
- Mappings:
Namespace Name Mixin selector named renderLnet/minecraft/client/gui/hud/ChatHud;render(Lnet/minecraft/client/font/TextConsumer;IIZ)Vintermediary method_75803Lnet/minecraft/class_338;method_75803(Lnet/minecraft/class_12225;IIZ)Vofficial aLghm;a(Lggs;IIZ)V
-
render
- Mappings:
Namespace Name Mixin selector named renderLnet/minecraft/client/gui/hud/ChatHud;render(Lnet/minecraft/client/gui/hud/ChatHud$Backend;IIZ)Vintermediary method_1805Lnet/minecraft/class_338;method_1805(Lnet/minecraft/class_338$class_12233;IIZ)Vofficial aLghm;a(Lghm$b;IIZ)V
-
isChatHidden
private boolean isChatHidden()- Mappings:
Namespace Name Mixin selector named isChatHiddenLnet/minecraft/client/gui/hud/ChatHud;isChatHidden()Zintermediary method_23677Lnet/minecraft/class_338;method_23677()Zofficial lLghm;l()Z
-
clear
public void clear(boolean clearHistory) - Mappings:
Namespace Name Mixin selector named clearLnet/minecraft/client/gui/hud/ChatHud;clear(Z)Vintermediary method_1808Lnet/minecraft/class_338;method_1808(Z)Vofficial aLghm;a(Z)V
-
addMessage
- Mappings:
Namespace Name Mixin selector named addMessageLnet/minecraft/client/gui/hud/ChatHud;addMessage(Lnet/minecraft/text/Text;)Vintermediary method_1812Lnet/minecraft/class_338;method_1812(Lnet/minecraft/class_2561;)Vofficial aLghm;a(Lyi;)V
-
addMessage
public void addMessage(Text message, @Nullable MessageSignatureData signatureData, @Nullable MessageIndicator indicator) - Mappings:
Namespace Name Mixin selector named addMessageLnet/minecraft/client/gui/hud/ChatHud;addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;Lnet/minecraft/client/gui/hud/MessageIndicator;)Vintermediary method_44811Lnet/minecraft/class_338;method_44811(Lnet/minecraft/class_2561;Lnet/minecraft/class_7469;Lnet/minecraft/class_7591;)Vofficial aLghm;a(Lyi;Lyv;Lgdm;)V
-
logChatMessage
- Mappings:
Namespace Name Mixin selector named logChatMessageLnet/minecraft/client/gui/hud/ChatHud;logChatMessage(Lnet/minecraft/client/gui/hud/ChatHudLine;)Vintermediary method_45027Lnet/minecraft/class_338;method_45027(Lnet/minecraft/class_303;)Vofficial aLghm;a(Lgdl;)V
-
addVisibleMessage
- Mappings:
Namespace Name Mixin selector named addVisibleMessageLnet/minecraft/client/gui/hud/ChatHud;addVisibleMessage(Lnet/minecraft/client/gui/hud/ChatHudLine;)Vintermediary method_1815Lnet/minecraft/class_338;method_1815(Lnet/minecraft/class_303;)Vofficial bLghm;b(Lgdl;)V
-
addMessage
- Mappings:
Namespace Name Mixin selector named addMessageLnet/minecraft/client/gui/hud/ChatHud;addMessage(Lnet/minecraft/client/gui/hud/ChatHudLine;)Vintermediary method_58744Lnet/minecraft/class_338;method_58744(Lnet/minecraft/class_303;)Vofficial cLghm;c(Lgdl;)V
-
tickRemovalQueue
private void tickRemovalQueue()- Mappings:
Namespace Name Mixin selector named tickRemovalQueueLnet/minecraft/client/gui/hud/ChatHud;tickRemovalQueue()Vintermediary method_45589Lnet/minecraft/class_338;method_45589()Vofficial mLghm;m()V
-
removeMessage
- Mappings:
Namespace Name Mixin selector named removeMessageLnet/minecraft/client/gui/hud/ChatHud;removeMessage(Lnet/minecraft/network/message/MessageSignatureData;)Vintermediary method_44812Lnet/minecraft/class_338;method_44812(Lnet/minecraft/class_7469;)Vofficial aLghm;a(Lyv;)V
-
queueForRemoval
- Mappings:
Namespace Name Mixin selector named queueForRemovalLnet/minecraft/client/gui/hud/ChatHud;queueForRemoval(Lnet/minecraft/network/message/MessageSignatureData;)Lnet/minecraft/client/gui/hud/ChatHud$RemovalQueuedMessage;intermediary method_45587Lnet/minecraft/class_338;method_45587(Lnet/minecraft/class_7469;)Lnet/minecraft/class_338$class_7731;official bLghm;b(Lyv;)Lghm$e;
-
createRemovalMarker
- Mappings:
Namespace Name Mixin selector named createRemovalMarkerLnet/minecraft/client/gui/hud/ChatHud;createRemovalMarker(Lnet/minecraft/client/gui/hud/ChatHudLine;)Lnet/minecraft/client/gui/hud/ChatHudLine;intermediary method_45586Lnet/minecraft/class_338;method_45586(Lnet/minecraft/class_303;)Lnet/minecraft/class_303;official dLghm;d(Lgdl;)Lgdl;
-
reset
public void reset()- Mappings:
Namespace Name Mixin selector named resetLnet/minecraft/client/gui/hud/ChatHud;reset()Vintermediary method_1817Lnet/minecraft/class_338;method_1817()Vofficial bLghm;b()V
-
refresh
private void refresh()- Mappings:
Namespace Name Mixin selector named refreshLnet/minecraft/client/gui/hud/ChatHud;refresh()Vintermediary method_44813Lnet/minecraft/class_338;method_44813()Vofficial nLghm;n()V
-
getMessageHistory
- Mappings:
Namespace Name Mixin selector named getMessageHistoryLnet/minecraft/client/gui/hud/ChatHud;getMessageHistory()Lnet/minecraft/util/collection/ArrayListDeque;intermediary method_1809Lnet/minecraft/class_338;method_1809()Lnet/minecraft/class_8623;official cLghm;c()Lben;
-
addToMessageHistory
- Mappings:
Namespace Name Mixin selector named addToMessageHistoryLnet/minecraft/client/gui/hud/ChatHud;addToMessageHistory(Ljava/lang/String;)Vintermediary method_1803Lnet/minecraft/class_338;method_1803(Ljava/lang/String;)Vofficial aLghm;a(Ljava/lang/String;)V
-
resetScroll
public void resetScroll()- Mappings:
Namespace Name Mixin selector named resetScrollLnet/minecraft/client/gui/hud/ChatHud;resetScroll()Vintermediary method_1820Lnet/minecraft/class_338;method_1820()Vofficial dLghm;d()V
-
scroll
public void scroll(int scroll) - Mappings:
Namespace Name Mixin selector named scrollLnet/minecraft/client/gui/hud/ChatHud;scroll(I)Vintermediary method_1802Lnet/minecraft/class_338;method_1802(I)Vofficial aLghm;a(I)V
-
isChatFocused
public boolean isChatFocused()- Mappings:
Namespace Name Mixin selector named isChatFocusedLnet/minecraft/client/gui/hud/ChatHud;isChatFocused()Zintermediary method_1819Lnet/minecraft/class_338;method_1819()Zofficial eLghm;e()Z
-
getWidth
private int getWidth()- Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/client/gui/hud/ChatHud;getWidth()Iintermediary method_1811Lnet/minecraft/class_338;method_1811()Iofficial oLghm;o()I
-
getHeight
private int getHeight()- Mappings:
Namespace Name Mixin selector named getHeightLnet/minecraft/client/gui/hud/ChatHud;getHeight()Iintermediary method_1810Lnet/minecraft/class_338;method_1810()Iofficial pLghm;p()I
-
getChatScale
private double getChatScale()- Mappings:
Namespace Name Mixin selector named getChatScaleLnet/minecraft/client/gui/hud/ChatHud;getChatScale()Dintermediary method_1814Lnet/minecraft/class_338;method_1814()Dofficial qLghm;q()D
-
getWidth
public static int getWidth(double widthOption) - Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/client/gui/hud/ChatHud;getWidth(D)Iintermediary method_1806Lnet/minecraft/class_338;method_1806(D)Iofficial aLghm;a(D)I
-
getHeight
public static int getHeight(double heightOption) - Mappings:
Namespace Name Mixin selector named getHeightLnet/minecraft/client/gui/hud/ChatHud;getHeight(D)Iintermediary method_1818Lnet/minecraft/class_338;method_1818(D)Iofficial bLghm;b(D)I
-
getDefaultUnfocusedHeight
public static double getDefaultUnfocusedHeight()- Mappings:
Namespace Name Mixin selector named getDefaultUnfocusedHeightLnet/minecraft/client/gui/hud/ChatHud;getDefaultUnfocusedHeight()Dintermediary method_41831Lnet/minecraft/class_338;method_41831()Dofficial fLghm;f()D
-
getVisibleLineCount
public int getVisibleLineCount()- Mappings:
Namespace Name Mixin selector named getVisibleLineCountLnet/minecraft/client/gui/hud/ChatHud;getVisibleLineCount()Iintermediary method_1813Lnet/minecraft/class_338;method_1813()Iofficial gLghm;g()I
-
getLineHeight
private int getLineHeight()- Mappings:
Namespace Name Mixin selector named getLineHeightLnet/minecraft/client/gui/hud/ChatHud;getLineHeight()Iintermediary method_44752Lnet/minecraft/class_338;method_44752()Iofficial rLghm;r()I
-
saveDraft
- Mappings:
Namespace Name Mixin selector named saveDraftLnet/minecraft/client/gui/hud/ChatHud;saveDraft(Ljava/lang/String;)Vintermediary method_73203Lnet/minecraft/class_338;method_73203(Ljava/lang/String;)Vofficial bLghm;b(Ljava/lang/String;)V
-
discardDraft
public void discardDraft()- Mappings:
Namespace Name Mixin selector named discardDraftLnet/minecraft/client/gui/hud/ChatHud;discardDraft()Vintermediary method_73204Lnet/minecraft/class_338;method_73204()Vofficial hLghm;h()V
-
createScreen
public <T extends ChatScreen> T createScreen(ChatHud.ChatMethod method, ChatScreen.Factory<T> factory) - Mappings:
Namespace Name Mixin selector named createScreenLnet/minecraft/client/gui/hud/ChatHud;createScreen(Lnet/minecraft/client/gui/hud/ChatHud$ChatMethod;Lnet/minecraft/client/gui/screen/ChatScreen$Factory;)Lnet/minecraft/client/gui/screen/ChatScreen;intermediary method_73201Lnet/minecraft/class_338;method_73201(Lnet/minecraft/class_338$class_11732;Lnet/minecraft/class_408$class_11738;)Lnet/minecraft/class_408;official aLghm;a(Lghm$c;Lgpg$a;)Lgpg;
-
setClientScreen
- Mappings:
Namespace Name Mixin selector named setClientScreenLnet/minecraft/client/gui/hud/ChatHud;setClientScreen(Lnet/minecraft/client/gui/hud/ChatHud$ChatMethod;Lnet/minecraft/client/gui/screen/ChatScreen$Factory;)Vintermediary method_73202Lnet/minecraft/class_338;method_73202(Lnet/minecraft/class_338$class_11732;Lnet/minecraft/class_408$class_11738;)Vofficial bLghm;b(Lghm$c;Lgpg$a;)V
-
setScreen
public void setScreen()- Mappings:
Namespace Name Mixin selector named setScreenLnet/minecraft/client/gui/hud/ChatHud;setScreen()Vintermediary method_73205Lnet/minecraft/class_338;method_73205()Vofficial iLghm;i()V
-
removeScreen
- Returns:
- the previous screen
- Mappings:
Namespace Name Mixin selector named removeScreenLnet/minecraft/client/gui/hud/ChatHud;removeScreen()Lnet/minecraft/client/gui/screen/ChatScreen;intermediary method_73206Lnet/minecraft/class_338;method_73206()Lnet/minecraft/class_408;official jLghm;j()Lgpg;
-
toChatState
- Mappings:
Namespace Name Mixin selector named toChatStateLnet/minecraft/client/gui/hud/ChatHud;toChatState()Lnet/minecraft/client/gui/hud/ChatHud$ChatState;intermediary method_58745Lnet/minecraft/class_338;method_58745()Lnet/minecraft/class_338$class_9477;official kLghm;k()Lghm$i;
-
restoreChatState
- Mappings:
Namespace Name Mixin selector named restoreChatStateLnet/minecraft/client/gui/hud/ChatHud;restoreChatState(Lnet/minecraft/client/gui/hud/ChatHud$ChatState;)Vintermediary method_58743Lnet/minecraft/class_338;method_58743(Lnet/minecraft/class_338$class_9477;)Vofficial aLghm;a(Lghm$i;)V
-