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 ghw
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enumstatic classprivate static 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 cLghw;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 dLghw;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 eLghw;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 fLghw;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 gLghw;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 hLghw;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 iLghw;i:Lyh;
-
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 aLghw;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 bLghw;b:Lamo;
-
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 jLghw;j:Lzf;
-
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 kLghw;k:Lgec;
-
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 lLghw;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 mLghw;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 nLghw;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 oLghw;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 pLghw;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 qLghw;q:Lghw$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 rLghw;r:Lgpq;
-
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 sLghw;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>Lghw;<init>(Lgec;)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 aLghw;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 aLghw;a(Lghw$a;Lghw$i;)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 aLghw;a(Lghi;Lghf;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 aLghw;a(Lghc;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 aLghw;a(Lghw$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 lLghw;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 aLghw;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 aLghw;a(Lyh;)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 aLghw;a(Lyh;Lyu;Lgdw;)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 aLghw;a(Lgdv;)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 bLghw;b(Lgdv;)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 cLghw;c(Lgdv;)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 mLghw;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 aLghw;a(Lyu;)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 bLghw;b(Lyu;)Lghw$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 dLghw;d(Lgdv;)Lgdv;
-
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 bLghw;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 nLghw;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 cLghw;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 aLghw;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 dLghw;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 aLghw;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 eLghw;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 oLghw;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 pLghw;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 qLghw;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 aLghw;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 bLghw;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 fLghw;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 gLghw;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 rLghw;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 bLghw;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 hLghw;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 aLghw;a(Lghw$c;Lgpq$a;)Lgpq;
-
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 bLghw;b(Lghw$c;Lgpq$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 iLghw;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 jLghw;j()Lgpq;
-
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 kLghw;k()Lghw$j;
-
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 aLghw;a(Lghw$j;)V
-