Class ChatComponent
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.ChatComponent
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<GuiMessage>private static final intprivate intprivate static final Componentprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate static final intprivate static final intprivate final List<ChatComponent.DelayedMessageDeletion>private final Minecraftprivate booleanprivate static final intprivate final List<GuiMessage.Line>Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATION - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(Component p_93786_) private voidaddMessage(Component p_240562_, MessageSignature p_241566_, int p_240583_, GuiMessageTag p_240624_, boolean p_240558_) voidaddMessage(Component p_241484_, MessageSignature p_241323_, GuiMessageTag p_241297_) voidaddRecentChat(String p_93784_) voidclearMessages(boolean p_93796_) private GuiMessagecreateDeletedMarker(GuiMessage p_249789_) static doublevoiddeleteMessage(MessageSignature p_241324_) deleteMessageOrDelay(MessageSignature p_251812_) private voiddrawTagIcon(PoseStack p_240586_, int p_240593_, int p_240610_, GuiMessageTag.Icon p_240605_) getClickedComponentStyleAt(double p_93801_, double p_93802_) intstatic intgetHeight(double p_93812_) private intintprivate intgetMessageEndIndexAt(double p_249245_, double p_252282_) private intgetMessageLineIndexAt(double p_249099_, double p_250008_) getMessageTagAt(double p_240576_, double p_240554_) doublegetScale()private intgetTagIconLeft(GuiMessage.Line p_240622_) private static doublegetTimeFactor(int p_93776_) intgetWidth()static intgetWidth(double p_93799_) booleanhandleChatQueueClicked(double p_93773_, double p_93774_) private booleanhasSelectedMessageTag(double p_240619_, GuiMessage.Line p_240547_, GuiMessageTag p_240637_) private booleanprivate booleanprivate voidlogChatMessage(Component p_242919_, GuiMessageTag p_242840_) private voidprivate voidvoidvoidvoidprivate doublescreenToChatX(double p_240580_) private doublescreenToChatY(double p_240548_) voidscrollChat(int p_205361_) voidtick()Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, vLine 
- 
Field Details
- 
LOGGER
private static final org.slf4j.Logger LOGGER - 
MAX_CHAT_HISTORY
private static final int MAX_CHAT_HISTORY- See Also:
 
 - 
MESSAGE_NOT_FOUND
private static final int MESSAGE_NOT_FOUND- See Also:
 
 - 
MESSAGE_INDENT
private static final int MESSAGE_INDENT- See Also:
 
 - 
MESSAGE_TAG_MARGIN_LEFT
private static final int MESSAGE_TAG_MARGIN_LEFT- See Also:
 
 - 
BOTTOM_MARGIN
private static final int BOTTOM_MARGIN- See Also:
 
 - 
TIME_BEFORE_MESSAGE_DELETION
private static final int TIME_BEFORE_MESSAGE_DELETION- See Also:
 
 - 
DELETED_CHAT_MESSAGE
 - 
minecraft
 - 
recentChat
 - 
allMessages
 - 
trimmedMessages
 - 
chatScrollbarPos
private int chatScrollbarPos - 
newMessageSinceScroll
private boolean newMessageSinceScroll - 
messageDeletionQueue
 
 - 
 - 
Constructor Details
- 
ChatComponent
 
 - 
 - 
Method Details
- 
tick
public void tick() - 
render
 - 
drawTagIcon
private void drawTagIcon(PoseStack p_240586_, int p_240593_, int p_240610_, GuiMessageTag.Icon p_240605_)  - 
getTagIconLeft
 - 
isChatHidden
private boolean isChatHidden() - 
getTimeFactor
private static double getTimeFactor(int p_93776_)  - 
clearMessages
public void clearMessages(boolean p_93796_)  - 
addMessage
 - 
addMessage
public void addMessage(Component p_241484_, @Nullable MessageSignature p_241323_, @Nullable GuiMessageTag p_241297_)  - 
logChatMessage
 - 
addMessage
private void addMessage(Component p_240562_, @Nullable MessageSignature p_241566_, int p_240583_, @Nullable GuiMessageTag p_240624_, boolean p_240558_)  - 
processMessageDeletionQueue
private void processMessageDeletionQueue() - 
deleteMessage
 - 
deleteMessageOrDelay
@Nullable private ChatComponent.DelayedMessageDeletion deleteMessageOrDelay(MessageSignature p_251812_)  - 
createDeletedMarker
 - 
rescaleChat
public void rescaleChat() - 
refreshTrimmedMessage
private void refreshTrimmedMessage() - 
getRecentChat
 - 
addRecentChat
 - 
resetChatScroll
public void resetChatScroll() - 
scrollChat
public void scrollChat(int p_205361_)  - 
handleChatQueueClicked
public boolean handleChatQueueClicked(double p_93773_, double p_93774_)  - 
getClickedComponentStyleAt
 - 
getMessageTagAt
 - 
hasSelectedMessageTag
private boolean hasSelectedMessageTag(double p_240619_, GuiMessage.Line p_240547_, GuiMessageTag p_240637_)  - 
screenToChatX
private double screenToChatX(double p_240580_)  - 
screenToChatY
private double screenToChatY(double p_240548_)  - 
getMessageEndIndexAt
private int getMessageEndIndexAt(double p_249245_, double p_252282_)  - 
getMessageLineIndexAt
private int getMessageLineIndexAt(double p_249099_, double p_250008_)  - 
isChatFocused
private boolean isChatFocused() - 
getWidth
public int getWidth() - 
getHeight
public int getHeight() - 
getScale
public double getScale() - 
getWidth
public static int getWidth(double p_93799_)  - 
getHeight
public static int getHeight(double p_93812_)  - 
defaultUnfocusedPct
public static double defaultUnfocusedPct() - 
getLinesPerPage
public int getLinesPerPage() - 
getLineHeight
private int getLineHeight() 
 -