Class ChatComponent
java.lang.Object
net.minecraft.client.gui.components.ChatComponent
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List
<GuiMessage> private static final int
private int
private static final Component
private static final org.slf4j.Logger
private static final int
private static final int
private static final int
private static final int
private final List
<ChatComponent.DelayedMessageDeletion> private final Minecraft
private boolean
private final ArrayListDeque
<String> private static final int
private final List
<GuiMessage.Line> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(Component p_93786_) void
addMessage
(Component p_241484_, MessageSignature p_241323_, GuiMessageTag p_241297_) private void
addMessageToDisplayQueue
(GuiMessage p_332173_) private void
addMessageToQueue
(GuiMessage p_330648_) void
addRecentChat
(String p_93784_) void
clearMessages
(boolean p_93796_) private GuiMessage
createDeletedMarker
(GuiMessage p_249789_) static double
void
deleteMessage
(MessageSignature p_241324_) deleteMessageOrDelay
(MessageSignature p_251812_) private void
drawTagIcon
(GuiGraphics p_283206_, int p_281677_, int p_281878_, GuiMessageTag.Icon p_282783_) getClickedComponentStyleAt
(double p_93801_, double p_93802_) int
static int
getHeight
(double p_93812_) private int
int
private int
getMessageEndIndexAt
(double p_249245_, double p_252282_) private int
getMessageLineIndexAt
(double p_249099_, double p_250008_) getMessageTagAt
(double p_240576_, double p_240554_) double
getScale()
private int
getTagIconLeft
(GuiMessage.Line p_240622_) private static double
getTimeFactor
(int p_93776_) int
getWidth()
static int
getWidth
(double p_93799_) boolean
handleChatQueueClicked
(double p_93773_, double p_93774_) private boolean
hasSelectedMessageTag
(double p_240619_, GuiMessage.Line p_240547_, GuiMessageTag p_240637_) boolean
private boolean
private void
logChatMessage
(GuiMessage p_328461_) private void
private void
void
render
(GuiGraphics p_282077_, int p_283491_, int p_282406_, int p_283111_, boolean p_328818_) void
void
void
restoreState
(ChatComponent.State p_330708_) private double
screenToChatX
(double p_240580_) private double
screenToChatY
(double p_240548_) void
scrollChat
(int p_205361_) void
tick()
-
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
public void render(GuiGraphics p_282077_, int p_283491_, int p_282406_, int p_283111_, boolean p_328818_) -
drawTagIcon
private void drawTagIcon(GuiGraphics p_283206_, int p_281677_, int p_281878_, GuiMessageTag.Icon p_282783_) -
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
-
addMessageToDisplayQueue
-
addMessageToQueue
-
processMessageDeletionQueue
private void processMessageDeletionQueue() -
deleteMessage
-
deleteMessageOrDelay
@Nullable private ChatComponent.DelayedMessageDeletion deleteMessageOrDelay(MessageSignature p_251812_) -
createDeletedMarker
-
rescaleChat
public void rescaleChat() -
refreshTrimmedMessages
private void refreshTrimmedMessages() -
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
public 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() -
storeState
-
restoreState
-