Class ChatComponent
java.lang.Object
net.minecraft.client.gui.components.ChatComponent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfacestatic interfacestatic enumprivate static classprivate static final recordstatic enumstatic final recordprivate static classprivate static classprivate static interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<GuiMessage> private static final intprivate intprivate static final Componentstatic final Identifierprivate @Nullable ChatComponent.Draftprivate static final org.slf4j.Loggerprivate static final intstatic final intprivate static final intprivate final List<ChatComponent.DelayedMessageDeletion> private final Minecraftprivate booleanprivate @Nullable ChatScreenstatic final Identifierprivate static final Styleprivate final ArrayListDeque<String> private static final Componentprivate static final Componentprivate static final intprivate static final intprivate final List<GuiMessage.Line> private Predicate<GuiMessage> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientSystemMessage(Component message) private voidaddMessage(Component contents, @Nullable MessageSignature signature, GuiMessageSource source, @Nullable GuiMessageTag tag) private voidaddMessageToDisplayQueue(GuiMessage message) private voidaddMessageToQueue(GuiMessage message) voidaddPlayerMessage(Component message, @Nullable MessageSignature signature, @Nullable GuiMessageTag tag) voidaddRecentChat(String message) voidaddServerSystemMessage(Component message) voidcaptureClickableText(ActiveTextCollector activeTextCollector, int screenHeight, int ticks, ChatComponent.DisplayMode displayMode) voidclearMessages(boolean history) private static GuiMessagecreateDeletedMarker(GuiMessage message) <T extends ChatScreen>
TcreateScreen(ChatComponent.ChatMethod chatMethod, ChatScreen.ChatConstructor<T> chat) static doublevoiddeleteMessage(MessageSignature signature) private @Nullable ChatComponent.DelayedMessageDeletiondeleteMessageOrDelay(MessageSignature signature) voidprivate voidextractRenderState(ChatComponent.ChatGraphicsAccess graphics, int screenHeight, int ticks, ChatComponent.DisplayMode displayMode) voidextractRenderState(GuiGraphicsExtractor graphics, Font font, int ticks, int mouseX, int mouseY, ChatComponent.DisplayMode displayMode, boolean changeCursorOnInsertions) private intforEachLine(ChatComponent.AlphaCalculator alphaCalculator, ChatComponent.LineConsumer lineConsumer) private intstatic intgetHeight(double pct) private intintdoublegetScale()private intgetWidth()static intgetWidth(double pct) booleanprivate voidlogChatMessage(GuiMessage message) voidopenScreen(ChatComponent.ChatMethod chatMethod, ChatScreen.ChatConstructor<?> chat) voidprivate voidprivate voidvoidvoid@Nullable ChatScreenvoidrestoreState(ChatComponent.State state) voidsaveAsDraft(String text) voidscrollChat(int dir) voidsetVisibleMessageFilter(Predicate<GuiMessage> visibleMessageFilter) voidtick()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAX_CHAT_HISTORY
private static final int MAX_CHAT_HISTORY- See Also:
-
MESSAGE_INDENT
private static final int MESSAGE_INDENT- See Also:
-
BOTTOM_MARGIN
private static final int BOTTOM_MARGIN- See Also:
-
TOOLTIP_MAX_WIDTH
private static final int TOOLTIP_MAX_WIDTH- See Also:
-
TIME_BEFORE_MESSAGE_DELETION
private static final int TIME_BEFORE_MESSAGE_DELETION- See Also:
-
DELETED_CHAT_MESSAGE
-
MESSAGE_BOTTOM_TO_MESSAGE_TOP
public static final int MESSAGE_BOTTOM_TO_MESSAGE_TOP- See Also:
-
QUEUE_EXPAND_ID
-
QUEUE_EXPAND_TEXT_STYLE
-
GO_TO_RESTRICTIONS_SCREEN
-
RESTRICTED_CHAT_MESSAGE
-
RESTRICTED_CHAT_MESSAGE_WITH_HOVER
-
minecraft
-
recentChat
-
allMessages
-
trimmedMessages
-
chatScrollbarPos
private int chatScrollbarPos -
newMessageSinceScroll
private boolean newMessageSinceScroll -
latestDraft
-
preservedScreen
-
messageDeletionQueue
-
visibleMessageFilter
-
-
Constructor Details
-
ChatComponent
-
-
Method Details
-
tick
public void tick() -
setVisibleMessageFilter
-
forEachLine
private int forEachLine(ChatComponent.AlphaCalculator alphaCalculator, ChatComponent.LineConsumer lineConsumer) -
extractRenderState
public void extractRenderState(GuiGraphicsExtractor graphics, Font font, int ticks, int mouseX, int mouseY, ChatComponent.DisplayMode displayMode, boolean changeCursorOnInsertions) -
captureClickableText
public void captureClickableText(ActiveTextCollector activeTextCollector, int screenHeight, int ticks, ChatComponent.DisplayMode displayMode) -
extractRenderState
private void extractRenderState(ChatComponent.ChatGraphicsAccess graphics, int screenHeight, int ticks, ChatComponent.DisplayMode displayMode) -
clearMessages
public void clearMessages(boolean history) -
addClientSystemMessage
-
addServerSystemMessage
-
addPlayerMessage
public void addPlayerMessage(Component message, @Nullable MessageSignature signature, @Nullable GuiMessageTag tag) -
addMessage
private void addMessage(Component contents, @Nullable MessageSignature signature, GuiMessageSource source, @Nullable GuiMessageTag tag) -
logChatMessage
-
addMessageToDisplayQueue
-
addMessageToQueue
-
processMessageDeletionQueue
private void processMessageDeletionQueue() -
deleteMessage
-
deleteMessageOrDelay
private @Nullable ChatComponent.DelayedMessageDeletion deleteMessageOrDelay(MessageSignature signature) -
createDeletedMarker
-
rescaleChat
public void rescaleChat() -
refreshTrimmedMessages
private void refreshTrimmedMessages() -
getRecentChat
-
addRecentChat
-
resetChatScroll
public void resetChatScroll() -
scrollChat
public void scrollChat(int dir) -
isChatFocused
public boolean isChatFocused() -
getWidth
private int getWidth() -
getHeight
private int getHeight() -
getScale
public double getScale() -
getWidth
public static int getWidth(double pct) -
getHeight
public static int getHeight(double pct) -
defaultUnfocusedPct
public static double defaultUnfocusedPct() -
getLinesPerPage
public int getLinesPerPage() -
getLineHeight
private int getLineHeight() -
saveAsDraft
-
discardDraft
public void discardDraft() -
createScreen
public <T extends ChatScreen> T createScreen(ChatComponent.ChatMethod chatMethod, ChatScreen.ChatConstructor<T> chat) -
openScreen
-
preserveCurrentChatScreen
public void preserveCurrentChatScreen() -
restoreChatScreen
-
storeState
-
restoreState
-