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 ggr
-
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 @Nullable 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 @Nullable 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) queueForRemoval(MessageSignatureData signature) private voidrefresh()voidremoveMessage(MessageSignatureData signature) voidrender(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 cLggr;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 dLggr;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 eLggr;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 fLggr;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 gLggr;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 hLggr;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 iLggr;i:Lym;
-
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 aLggr;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 bLggr;b:Lamy;
-
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 jLggr;j:Lzk;
-
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 kLggr;k:Lgcx;
-
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 lLggr;l:Lber;
-
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 mLggr;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 nLggr;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 oLggr;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 pLggr;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 qLggr;q:Lggr$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 rLggr;r:Lgok;
-
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 sLggr;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>Lggr;<init>(Lgcx;)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 aLggr;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 aLggr;a(Lggr$a;Lggr$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 aLggr;a(Lggd;Lgga;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 aLggr;a(Lgfx;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 aLggr;a(Lggr$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 lLggr;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 aLggr;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 aLggr;a(Lym;)V
-
addMessage
public void addMessage(Text message, @Nullable @Nullable MessageSignatureData signatureData, @Nullable @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 aLggr;a(Lym;Lyz;Lgcr;)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 aLggr;a(Lgcq;)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 bLggr;b(Lgcq;)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 cLggr;c(Lgcq;)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 mLggr;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 aLggr;a(Lyz;)V
-
queueForRemoval
@Nullable private @Nullable ChatHud.RemovalQueuedMessage queueForRemoval(MessageSignatureData signature) - 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 bLggr;b(Lyz;)Lggr$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 dLggr;d(Lgcq;)Lgcq;
-
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 bLggr;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 nLggr;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 cLggr;c()Lber;
-
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 aLggr;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 dLggr;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 aLggr;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 eLggr;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 oLggr;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 pLggr;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 qLggr;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 aLggr;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 bLggr;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 fLggr;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 gLggr;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 rLggr;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 bLggr;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 hLggr;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 aLggr;a(Lggr$c;Lgok$a;)Lgok;
-
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 bLggr;b(Lggr$c;Lgok$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 iLggr;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 jLggr;j()Lgok;
-
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 kLggr;k()Lggr$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 aLggr;a(Lggr$i;)V
-