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/ChatHud
intermediary net/minecraft/class_338
official fhg
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
private static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MinecraftClient
private static final Text
private static final int
private static final int
private boolean
private static final Logger
private static final int
private final ArrayListDeque
<String> private final List
<ChatHudLine> private static final int
private static final int
private static final int
private final List
<ChatHud.RemovalQueuedMessage> private int
private final List
<ChatHudLine.Visible> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addMessage
(ChatHudLine message) void
addMessage
(Text message) void
addMessage
(Text message, @Nullable MessageSignatureData signatureData, @Nullable MessageIndicator indicator) void
addToMessageHistory
(String message) private void
addVisibleMessage
(ChatHudLine message) void
clear
(boolean clearHistory) private ChatHudLine
createRemovalMarker
(ChatHudLine original) private void
drawIndicatorIcon
(DrawContext context, int x, int y, MessageIndicator.Icon icon) double
static double
int
static int
getHeight
(double heightOption) getIndicatorAt
(double mouseX, double mouseY) private int
private int
private int
getMessageIndex
(double chatLineX, double chatLineY) private int
getMessageLineIndex
(double chatLineX, double chatLineY) private static double
getMessageOpacityMultiplier
(int age) getTextStyleAt
(double x, double y) int
int
getWidth()
static int
getWidth
(double widthOption) boolean
private boolean
private boolean
isXInsideIndicatorIcon
(double x, ChatHudLine.Visible line, MessageIndicator indicator) private void
logChatMessage
(ChatHudLine message) boolean
mouseClicked
(double mouseX, double mouseY) queueForRemoval
(MessageSignatureData signature) private void
refresh()
void
removeMessage
(MessageSignatureData signature) void
render
(DrawContext context, int currentTick, int mouseX, int mouseY, boolean focused) void
reset()
void
void
void
scroll
(int scroll) private void
void
private double
toChatLineX
(double x) private double
toChatLineY
(double y)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/client/gui/hud/ChatHud;LOGGER:Lorg/slf4j/Logger;
intermediary field_2065
Lnet/minecraft/class_338;field_2065:Lorg/slf4j/Logger;
official a
Lfhg;a:Lorg/slf4j/Logger;
-
MAX_MESSAGES
private static final int MAX_MESSAGES- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_MESSAGES
Lnet/minecraft/client/gui/hud/ChatHud;MAX_MESSAGES:I
intermediary field_32180
Lnet/minecraft/class_338;field_32180:I
official b
Lfhg;b:I
-
MISSING_MESSAGE_INDEX
private static final int MISSING_MESSAGE_INDEX- See Also:
- Mappings:
Namespace Name Mixin selector named MISSING_MESSAGE_INDEX
Lnet/minecraft/client/gui/hud/ChatHud;MISSING_MESSAGE_INDEX:I
intermediary field_39771
Lnet/minecraft/class_338;field_39771:I
official c
Lfhg;c:I
-
field_39772
private static final int field_39772- See Also:
- Mappings:
Namespace Name Mixin selector named field_39772
Lnet/minecraft/client/gui/hud/ChatHud;field_39772:I
intermediary field_39772
Lnet/minecraft/class_338;field_39772:I
official d
Lfhg;d:I
-
field_39773
private static final int field_39773- See Also:
- Mappings:
Namespace Name Mixin selector named field_39773
Lnet/minecraft/client/gui/hud/ChatHud;field_39773:I
intermediary field_39773
Lnet/minecraft/class_338;field_39773:I
official e
Lfhg;e:I
-
OFFSET_FROM_BOTTOM
private static final int OFFSET_FROM_BOTTOM- See Also:
- Mappings:
Namespace Name Mixin selector named OFFSET_FROM_BOTTOM
Lnet/minecraft/client/gui/hud/ChatHud;OFFSET_FROM_BOTTOM:I
intermediary field_40389
Lnet/minecraft/class_338;field_40389:I
official f
Lfhg;f:I
-
REMOVAL_QUEUE_TICKS
private static final int REMOVAL_QUEUE_TICKS- See Also:
- Mappings:
Namespace Name Mixin selector named REMOVAL_QUEUE_TICKS
Lnet/minecraft/client/gui/hud/ChatHud;REMOVAL_QUEUE_TICKS:I
intermediary field_40390
Lnet/minecraft/class_338;field_40390:I
official g
Lfhg;g:I
-
DELETED_MARKER_TEXT
- Mappings:
Namespace Name Mixin selector named DELETED_MARKER_TEXT
Lnet/minecraft/client/gui/hud/ChatHud;DELETED_MARKER_TEXT:Lnet/minecraft/text/Text;
intermediary field_40391
Lnet/minecraft/class_338;field_40391:Lnet/minecraft/class_2561;
official h
Lfhg;h:Lxp;
-
client
- Mappings:
Namespace Name Mixin selector named client
Lnet/minecraft/client/gui/hud/ChatHud;client:Lnet/minecraft/client/MinecraftClient;
intermediary field_2062
Lnet/minecraft/class_338;field_2062:Lnet/minecraft/class_310;
official i
Lfhg;i:Lffg;
-
messageHistory
- Mappings:
Namespace Name Mixin selector named messageHistory
Lnet/minecraft/client/gui/hud/ChatHud;messageHistory:Lnet/minecraft/util/collection/ArrayListDeque;
intermediary field_2063
Lnet/minecraft/class_338;field_2063:Lnet/minecraft/class_8623;
official j
Lfhg;j:Laxm;
-
messages
- Mappings:
Namespace Name Mixin selector named messages
Lnet/minecraft/client/gui/hud/ChatHud;messages:Ljava/util/List;
intermediary field_2061
Lnet/minecraft/class_338;field_2061:Ljava/util/List;
official k
Lfhg;k:Ljava/util/List;
-
visibleMessages
- Mappings:
Namespace Name Mixin selector named visibleMessages
Lnet/minecraft/client/gui/hud/ChatHud;visibleMessages:Ljava/util/List;
intermediary field_2064
Lnet/minecraft/class_338;field_2064:Ljava/util/List;
official l
Lfhg;l:Ljava/util/List;
-
scrolledLines
private int scrolledLines- Mappings:
Namespace Name Mixin selector named scrolledLines
Lnet/minecraft/client/gui/hud/ChatHud;scrolledLines:I
intermediary field_2066
Lnet/minecraft/class_338;field_2066:I
official m
Lfhg;m:I
-
hasUnreadNewMessages
private boolean hasUnreadNewMessages- Mappings:
Namespace Name Mixin selector named hasUnreadNewMessages
Lnet/minecraft/client/gui/hud/ChatHud;hasUnreadNewMessages:Z
intermediary field_2067
Lnet/minecraft/class_338;field_2067:Z
official n
Lfhg;n:Z
-
removalQueue
- Mappings:
Namespace Name Mixin selector named removalQueue
Lnet/minecraft/client/gui/hud/ChatHud;removalQueue:Ljava/util/List;
intermediary field_40392
Lnet/minecraft/class_338;field_40392:Ljava/util/List;
official o
Lfhg;o:Ljava/util/List;
-
-
Constructor Details
-
ChatHud
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/client/gui/hud/ChatHud;<init>(Lnet/minecraft/client/MinecraftClient;)V
intermediary <init>
Lnet/minecraft/class_338;<init>(Lnet/minecraft/class_310;)V
official <init>
Lfhg;<init>(Lffg;)V
-
-
Method Details
-
tickRemovalQueueIfExists
public void tickRemovalQueueIfExists()- Mappings:
Namespace Name Mixin selector named tickRemovalQueueIfExists
Lnet/minecraft/client/gui/hud/ChatHud;tickRemovalQueueIfExists()V
intermediary method_45584
Lnet/minecraft/class_338;method_45584()V
official a
Lfhg;a()V
-
render
- Mappings:
Namespace Name Mixin selector named render
Lnet/minecraft/client/gui/hud/ChatHud;render(Lnet/minecraft/client/gui/DrawContext;IIIZ)V
intermediary method_1805
Lnet/minecraft/class_338;method_1805(Lnet/minecraft/class_332;IIIZ)V
official a
Lfhg;a(Lfgs;IIIZ)V
-
drawIndicatorIcon
- Mappings:
Namespace Name Mixin selector named drawIndicatorIcon
Lnet/minecraft/client/gui/hud/ChatHud;drawIndicatorIcon(Lnet/minecraft/client/gui/DrawContext;IILnet/minecraft/client/gui/hud/MessageIndicator$Icon;)V
intermediary method_44719
Lnet/minecraft/class_338;method_44719(Lnet/minecraft/class_332;IILnet/minecraft/class_7591$class_7592;)V
official a
Lfhg;a(Lfgs;IILffb$a;)V
-
getIndicatorX
- Mappings:
Namespace Name Mixin selector named getIndicatorX
Lnet/minecraft/client/gui/hud/ChatHud;getIndicatorX(Lnet/minecraft/client/gui/hud/ChatHudLine$Visible;)I
intermediary method_44720
Lnet/minecraft/class_338;method_44720(Lnet/minecraft/class_303$class_7590;)I
official a
Lfhg;a(Lffa$a;)I
-
isChatHidden
private boolean isChatHidden()- Mappings:
Namespace Name Mixin selector named isChatHidden
Lnet/minecraft/client/gui/hud/ChatHud;isChatHidden()Z
intermediary method_23677
Lnet/minecraft/class_338;method_23677()Z
official l
Lfhg;l()Z
-
getMessageOpacityMultiplier
private static double getMessageOpacityMultiplier(int age) - Mappings:
Namespace Name Mixin selector named getMessageOpacityMultiplier
Lnet/minecraft/client/gui/hud/ChatHud;getMessageOpacityMultiplier(I)D
intermediary method_19348
Lnet/minecraft/class_338;method_19348(I)D
official b
Lfhg;b(I)D
-
clear
public void clear(boolean clearHistory) - Mappings:
Namespace Name Mixin selector named clear
Lnet/minecraft/client/gui/hud/ChatHud;clear(Z)V
intermediary method_1808
Lnet/minecraft/class_338;method_1808(Z)V
official a
Lfhg;a(Z)V
-
addMessage
- Mappings:
Namespace Name Mixin selector named addMessage
Lnet/minecraft/client/gui/hud/ChatHud;addMessage(Lnet/minecraft/text/Text;)V
intermediary method_1812
Lnet/minecraft/class_338;method_1812(Lnet/minecraft/class_2561;)V
official a
Lfhg;a(Lxp;)V
-
addMessage
public void addMessage(Text message, @Nullable @Nullable MessageSignatureData signatureData, @Nullable @Nullable MessageIndicator indicator) - Mappings:
Namespace Name Mixin selector named addMessage
Lnet/minecraft/client/gui/hud/ChatHud;addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;Lnet/minecraft/client/gui/hud/MessageIndicator;)V
intermediary method_44811
Lnet/minecraft/class_338;method_44811(Lnet/minecraft/class_2561;Lnet/minecraft/class_7469;Lnet/minecraft/class_7591;)V
official a
Lfhg;a(Lxp;Lyb;Lffb;)V
-
logChatMessage
- Mappings:
Namespace Name Mixin selector named logChatMessage
Lnet/minecraft/client/gui/hud/ChatHud;logChatMessage(Lnet/minecraft/client/gui/hud/ChatHudLine;)V
intermediary method_45027
Lnet/minecraft/class_338;method_45027(Lnet/minecraft/class_303;)V
official a
Lfhg;a(Lffa;)V
-
addVisibleMessage
- Mappings:
Namespace Name Mixin selector named addVisibleMessage
Lnet/minecraft/client/gui/hud/ChatHud;addVisibleMessage(Lnet/minecraft/client/gui/hud/ChatHudLine;)V
intermediary method_1815
Lnet/minecraft/class_338;method_1815(Lnet/minecraft/class_303;)V
official b
Lfhg;b(Lffa;)V
-
addMessage
- Mappings:
Namespace Name Mixin selector named addMessage
Lnet/minecraft/client/gui/hud/ChatHud;addMessage(Lnet/minecraft/client/gui/hud/ChatHudLine;)V
intermediary method_58744
Lnet/minecraft/class_338;method_58744(Lnet/minecraft/class_303;)V
official c
Lfhg;c(Lffa;)V
-
tickRemovalQueue
private void tickRemovalQueue()- Mappings:
Namespace Name Mixin selector named tickRemovalQueue
Lnet/minecraft/client/gui/hud/ChatHud;tickRemovalQueue()V
intermediary method_45589
Lnet/minecraft/class_338;method_45589()V
official m
Lfhg;m()V
-
removeMessage
- Mappings:
Namespace Name Mixin selector named removeMessage
Lnet/minecraft/client/gui/hud/ChatHud;removeMessage(Lnet/minecraft/network/message/MessageSignatureData;)V
intermediary method_44812
Lnet/minecraft/class_338;method_44812(Lnet/minecraft/class_7469;)V
official a
Lfhg;a(Lyb;)V
-
queueForRemoval
@Nullable private @Nullable ChatHud.RemovalQueuedMessage queueForRemoval(MessageSignatureData signature) - Mappings:
Namespace Name Mixin selector named queueForRemoval
Lnet/minecraft/client/gui/hud/ChatHud;queueForRemoval(Lnet/minecraft/network/message/MessageSignatureData;)Lnet/minecraft/client/gui/hud/ChatHud$RemovalQueuedMessage;
intermediary method_45587
Lnet/minecraft/class_338;method_45587(Lnet/minecraft/class_7469;)Lnet/minecraft/class_338$class_7731;
official b
Lfhg;b(Lyb;)Lfhg$a;
-
createRemovalMarker
- Mappings:
Namespace Name Mixin selector named createRemovalMarker
Lnet/minecraft/client/gui/hud/ChatHud;createRemovalMarker(Lnet/minecraft/client/gui/hud/ChatHudLine;)Lnet/minecraft/client/gui/hud/ChatHudLine;
intermediary method_45586
Lnet/minecraft/class_338;method_45586(Lnet/minecraft/class_303;)Lnet/minecraft/class_303;
official d
Lfhg;d(Lffa;)Lffa;
-
reset
public void reset()- Mappings:
Namespace Name Mixin selector named reset
Lnet/minecraft/client/gui/hud/ChatHud;reset()V
intermediary method_1817
Lnet/minecraft/class_338;method_1817()V
official b
Lfhg;b()V
-
refresh
private void refresh()- Mappings:
Namespace Name Mixin selector named refresh
Lnet/minecraft/client/gui/hud/ChatHud;refresh()V
intermediary method_44813
Lnet/minecraft/class_338;method_44813()V
official n
Lfhg;n()V
-
getMessageHistory
- Mappings:
Namespace Name Mixin selector named getMessageHistory
Lnet/minecraft/client/gui/hud/ChatHud;getMessageHistory()Lnet/minecraft/util/collection/ArrayListDeque;
intermediary method_1809
Lnet/minecraft/class_338;method_1809()Lnet/minecraft/class_8623;
official c
Lfhg;c()Laxm;
-
addToMessageHistory
- Mappings:
Namespace Name Mixin selector named addToMessageHistory
Lnet/minecraft/client/gui/hud/ChatHud;addToMessageHistory(Ljava/lang/String;)V
intermediary method_1803
Lnet/minecraft/class_338;method_1803(Ljava/lang/String;)V
official a
Lfhg;a(Ljava/lang/String;)V
-
resetScroll
public void resetScroll()- Mappings:
Namespace Name Mixin selector named resetScroll
Lnet/minecraft/client/gui/hud/ChatHud;resetScroll()V
intermediary method_1820
Lnet/minecraft/class_338;method_1820()V
official d
Lfhg;d()V
-
scroll
public void scroll(int scroll) - Mappings:
Namespace Name Mixin selector named scroll
Lnet/minecraft/client/gui/hud/ChatHud;scroll(I)V
intermediary method_1802
Lnet/minecraft/class_338;method_1802(I)V
official a
Lfhg;a(I)V
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY) - Mappings:
Namespace Name Mixin selector named mouseClicked
Lnet/minecraft/client/gui/hud/ChatHud;mouseClicked(DD)Z
intermediary method_27146
Lnet/minecraft/class_338;method_27146(DD)Z
official a
Lfhg;a(DD)Z
-
getTextStyleAt
- Mappings:
Namespace Name Mixin selector named getTextStyleAt
Lnet/minecraft/client/gui/hud/ChatHud;getTextStyleAt(DD)Lnet/minecraft/text/Style;
intermediary method_1816
Lnet/minecraft/class_338;method_1816(DD)Lnet/minecraft/class_2583;
official b
Lfhg;b(DD)Lym;
-
getIndicatorAt
- Mappings:
Namespace Name Mixin selector named getIndicatorAt
Lnet/minecraft/client/gui/hud/ChatHud;getIndicatorAt(DD)Lnet/minecraft/client/gui/hud/MessageIndicator;
intermediary method_44723
Lnet/minecraft/class_338;method_44723(DD)Lnet/minecraft/class_7591;
official c
Lfhg;c(DD)Lffb;
-
isXInsideIndicatorIcon
private boolean isXInsideIndicatorIcon(double x, ChatHudLine.Visible line, MessageIndicator indicator) - Mappings:
Namespace Name Mixin selector named isXInsideIndicatorIcon
Lnet/minecraft/client/gui/hud/ChatHud;isXInsideIndicatorIcon(DLnet/minecraft/client/gui/hud/ChatHudLine$Visible;Lnet/minecraft/client/gui/hud/MessageIndicator;)Z
intermediary method_44718
Lnet/minecraft/class_338;method_44718(DLnet/minecraft/class_303$class_7590;Lnet/minecraft/class_7591;)Z
official a
Lfhg;a(DLffa$a;Lffb;)Z
-
toChatLineX
private double toChatLineX(double x) - Mappings:
Namespace Name Mixin selector named toChatLineX
Lnet/minecraft/client/gui/hud/ChatHud;toChatLineX(D)D
intermediary method_44722
Lnet/minecraft/class_338;method_44722(D)D
official c
Lfhg;c(D)D
-
toChatLineY
private double toChatLineY(double y) - Mappings:
Namespace Name Mixin selector named toChatLineY
Lnet/minecraft/client/gui/hud/ChatHud;toChatLineY(D)D
intermediary method_44724
Lnet/minecraft/class_338;method_44724(D)D
official d
Lfhg;d(D)D
-
getMessageIndex
private int getMessageIndex(double chatLineX, double chatLineY) - Mappings:
Namespace Name Mixin selector named getMessageIndex
Lnet/minecraft/client/gui/hud/ChatHud;getMessageIndex(DD)I
intermediary method_45588
Lnet/minecraft/class_338;method_45588(DD)I
official d
Lfhg;d(DD)I
-
getMessageLineIndex
private int getMessageLineIndex(double chatLineX, double chatLineY) - Mappings:
Namespace Name Mixin selector named getMessageLineIndex
Lnet/minecraft/client/gui/hud/ChatHud;getMessageLineIndex(DD)I
intermediary method_44725
Lnet/minecraft/class_338;method_44725(DD)I
official e
Lfhg;e(DD)I
-
isChatFocused
public boolean isChatFocused()- Mappings:
Namespace Name Mixin selector named isChatFocused
Lnet/minecraft/client/gui/hud/ChatHud;isChatFocused()Z
intermediary method_1819
Lnet/minecraft/class_338;method_1819()Z
official e
Lfhg;e()Z
-
getWidth
public int getWidth()- Mappings:
Namespace Name Mixin selector named getWidth
Lnet/minecraft/client/gui/hud/ChatHud;getWidth()I
intermediary method_1811
Lnet/minecraft/class_338;method_1811()I
official f
Lfhg;f()I
-
getHeight
public int getHeight()- Mappings:
Namespace Name Mixin selector named getHeight
Lnet/minecraft/client/gui/hud/ChatHud;getHeight()I
intermediary method_1810
Lnet/minecraft/class_338;method_1810()I
official g
Lfhg;g()I
-
getChatScale
public double getChatScale()- Mappings:
Namespace Name Mixin selector named getChatScale
Lnet/minecraft/client/gui/hud/ChatHud;getChatScale()D
intermediary method_1814
Lnet/minecraft/class_338;method_1814()D
official h
Lfhg;h()D
-
getWidth
public static int getWidth(double widthOption) - Mappings:
Namespace Name Mixin selector named getWidth
Lnet/minecraft/client/gui/hud/ChatHud;getWidth(D)I
intermediary method_1806
Lnet/minecraft/class_338;method_1806(D)I
official a
Lfhg;a(D)I
-
getHeight
public static int getHeight(double heightOption) - Mappings:
Namespace Name Mixin selector named getHeight
Lnet/minecraft/client/gui/hud/ChatHud;getHeight(D)I
intermediary method_1818
Lnet/minecraft/class_338;method_1818(D)I
official b
Lfhg;b(D)I
-
getDefaultUnfocusedHeight
public static double getDefaultUnfocusedHeight()- Mappings:
Namespace Name Mixin selector named getDefaultUnfocusedHeight
Lnet/minecraft/client/gui/hud/ChatHud;getDefaultUnfocusedHeight()D
intermediary method_41831
Lnet/minecraft/class_338;method_41831()D
official i
Lfhg;i()D
-
getVisibleLineCount
public int getVisibleLineCount()- Mappings:
Namespace Name Mixin selector named getVisibleLineCount
Lnet/minecraft/client/gui/hud/ChatHud;getVisibleLineCount()I
intermediary method_1813
Lnet/minecraft/class_338;method_1813()I
official j
Lfhg;j()I
-
getLineHeight
private int getLineHeight()- Mappings:
Namespace Name Mixin selector named getLineHeight
Lnet/minecraft/client/gui/hud/ChatHud;getLineHeight()I
intermediary method_44752
Lnet/minecraft/class_338;method_44752()I
official o
Lfhg;o()I
-
toChatState
- Mappings:
Namespace Name Mixin selector named toChatState
Lnet/minecraft/client/gui/hud/ChatHud;toChatState()Lnet/minecraft/client/gui/hud/ChatHud$ChatState;
intermediary method_58745
Lnet/minecraft/class_338;method_58745()Lnet/minecraft/class_338$class_9477;
official k
Lfhg;k()Lfhg$b;
-
restoreChatState
- Mappings:
Namespace Name Mixin selector named restoreChatState
Lnet/minecraft/client/gui/hud/ChatHud;restoreChatState(Lnet/minecraft/client/gui/hud/ChatHud$ChatState;)V
intermediary method_58743
Lnet/minecraft/class_338;method_58743(Lnet/minecraft/class_338$class_9477;)V
official a
Lfhg;a(Lfhg$b;)V
-