Package net.minecraft.client.report
Interface ChatLog
- All Known Implementing Classes:
ChatLogImpl
A chat log holds received chat and game messages with sequential indices, where
newer messages receive bigger indices. An implementation using fixed-size array
is available at
ChatLogImpl.- Mappings:
Namespace Name official eujintermediary net/minecraft/class_7555named net/minecraft/client/report/ChatLog
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA set of streams of logged messages. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ReceivedMessage message) Addsmessageto the log.intclampWithOffset(int index, int offset) Returns the index offset byoffsetand clamped between the minimum and the maximum indices.default booleancontains(int index) Returns whether the log contains a message with indexindex.private ChatLog.StreamsReturns the empty stream.get(int index) Returns the message with indexindex, ornullif there is no such message in the log.default ReceivedMessage.IndexedMessagegetIndexed(int index) Returns the indexed message with indexindex, ornullif there is no such message in the log.intReturns the maximum index currently used within the log.intReturns the minimum index currently used within the log.default intgetNextIndex(int index) Returns the index offset by1if there is a message with that index, or -1 if there is no message with the offset index.intgetOffsetIndex(int index, int offset) Returns the index offset byoffsetif there is a message with that index, or -1 if there is no message with the offset index.default intgetPreviousIndex(int index) Returns the index offset by-1if there is a message with that index, or -1 if there is no message with the offset index.default ChatLog.Streamsstream(int startIndex, IntUnaryOperator nextIndexGetter) Returns the streams starting fromstartIndex.default ChatLog.StreamsReturns the streams starting from the biggest index in the log with entires ordered antichronologically (in descending order).default ChatLog.StreamsstreamBackward(int startIndex) Returns the streams starting fromstartIndexwith entires ordered antichronologically (in descending order).default ChatLog.StreamsReturns the streams starting from the smallest index in the log with entires ordered chronologically (in ascending order).default ChatLog.StreamsstreamForward(int startIndex) Returns the streams starting fromstartIndexwith entires ordered chronologically (in ascending order).default ChatLog.StreamsstreamForward(int startIndex, int endIndex) Returns the streams starting fromstartIndexwith entires ordered chronologically (in ascending order) up to and includingendIndex.
-
Field Details
-
MISSING_NEXT_INDEX
static final int MISSING_NEXT_INDEX- See Also:
- Mappings:
Namespace Name Mixin selector official aLeuj;a:Iintermediary field_39629Lnet/minecraft/class_7555;field_39629:Inamed MISSING_NEXT_INDEXLnet/minecraft/client/report/ChatLog;MISSING_NEXT_INDEX:I
-
-
Method Details
-
add
Addsmessageto the log.- Mappings:
Namespace Name Mixin selector official aLeuj;a(Leul;)Vintermediary method_44535Lnet/minecraft/class_7555;method_44535(Lnet/minecraft/class_7557;)Vnamed addLnet/minecraft/client/report/ChatLog;add(Lnet/minecraft/client/report/ReceivedMessage;)V
-
get
Returns the message with indexindex, ornullif there is no such message in the log.- Returns:
- the message with index
index, ornullif there is no such message in the log - Mappings:
Namespace Name Mixin selector official aLeuj;a(I)Leul;intermediary method_44532Lnet/minecraft/class_7555;method_44532(I)Lnet/minecraft/class_7557;named getLnet/minecraft/client/report/ChatLog;get(I)Lnet/minecraft/client/report/ReceivedMessage;
-
getIndexed
Returns the indexed message with indexindex, ornullif there is no such message in the log.- Returns:
- the indexed message with index
index, ornullif there is no such message in the log - Mappings:
Namespace Name Mixin selector official bLeuj;b(I)Leul$c;intermediary method_44537Lnet/minecraft/class_7555;method_44537(I)Lnet/minecraft/class_7557$class_7560;named getIndexedLnet/minecraft/client/report/ChatLog;getIndexed(I)Lnet/minecraft/client/report/ReceivedMessage$IndexedMessage;
-
contains
default boolean contains(int index) Returns whether the log contains a message with indexindex.- Returns:
- whether the log contains a message with index
index - Mappings:
Namespace Name Mixin selector official cLeuj;c(I)Zintermediary method_44540Lnet/minecraft/class_7555;method_44540(I)Znamed containsLnet/minecraft/client/report/ChatLog;contains(I)Z
-
getOffsetIndex
int getOffsetIndex(int index, int offset) Returns the index offset byoffsetif there is a message with that index, or -1 if there is no message with the offset index.- Returns:
- the index offset by
offsetif there is a message with that index, or -1 if there is no message with the offset index - Mappings:
Namespace Name Mixin selector official aLeuj;a(II)Iintermediary method_44533Lnet/minecraft/class_7555;method_44533(II)Inamed getOffsetIndexLnet/minecraft/client/report/ChatLog;getOffsetIndex(II)I
-
clampWithOffset
int clampWithOffset(int index, int offset) Returns the index offset byoffsetand clamped between the minimum and the maximum indices.- Returns:
- the index offset by
offsetand clamped between the minimum and the maximum indices - See Also:
- Mappings:
Namespace Name Mixin selector official bLeuj;b(II)Iintermediary method_44538Lnet/minecraft/class_7555;method_44538(II)Inamed clampWithOffsetLnet/minecraft/client/report/ChatLog;clampWithOffset(II)I
-
getPreviousIndex
default int getPreviousIndex(int index) Returns the index offset by-1if there is a message with that index, or -1 if there is no message with the offset index.- Returns:
- the index offset by
-1if there is a message with that index, or -1 if there is no message with the offset index - See Also:
- Mappings:
Namespace Name Mixin selector official dLeuj;d(I)Iintermediary method_44543Lnet/minecraft/class_7555;method_44543(I)Inamed getPreviousIndexLnet/minecraft/client/report/ChatLog;getPreviousIndex(I)I
-
getNextIndex
default int getNextIndex(int index) Returns the index offset by1if there is a message with that index, or -1 if there is no message with the offset index.- Returns:
- the index offset by
1if there is a message with that index, or -1 if there is no message with the offset index - See Also:
- Mappings:
Namespace Name Mixin selector official eLeuj;e(I)Iintermediary method_44545Lnet/minecraft/class_7555;method_44545(I)Inamed getNextIndexLnet/minecraft/client/report/ChatLog;getNextIndex(I)I
-
getMaxIndex
int getMaxIndex()Returns the maximum index currently used within the log.This value changes every time a new message gets added. The message associated with this index is the newest one in the log.
- Returns:
- the maximum index currently used within the log
- Mappings:
Namespace Name Mixin selector official aLeuj;a()Iintermediary method_44531Lnet/minecraft/class_7555;method_44531()Inamed getMaxIndexLnet/minecraft/client/report/ChatLog;getMaxIndex()I
-
getMinIndex
int getMinIndex()Returns the minimum index currently used within the log.This value can change every time a new message gets added. The message associated with this index is the oldest one in the log.
- Returns:
- the minimum index currently used within the log
- Mappings:
Namespace Name Mixin selector official bLeuj;b()Iintermediary method_44536Lnet/minecraft/class_7555;method_44536()Inamed getMinIndexLnet/minecraft/client/report/ChatLog;getMinIndex()I
-
streamForward
Returns the streams starting from the smallest index in the log with entires ordered chronologically (in ascending order).- Returns:
- the streams starting from the smallest index in the log with entires ordered chronologically (in ascending order)
- Mappings:
Namespace Name Mixin selector official cLeuj;c()Leuj$a;intermediary method_44539Lnet/minecraft/class_7555;method_44539()Lnet/minecraft/class_7555$class_7556;named streamForwardLnet/minecraft/client/report/ChatLog;streamForward()Lnet/minecraft/client/report/ChatLog$Streams;
-
streamBackward
Returns the streams starting from the biggest index in the log with entires ordered antichronologically (in descending order).- Returns:
- the streams starting from the biggest index in the log with entires ordered antichronologically (in descending order)
- Mappings:
Namespace Name Mixin selector official dLeuj;d()Leuj$a;intermediary method_44702Lnet/minecraft/class_7555;method_44702()Lnet/minecraft/class_7555$class_7556;named streamBackwardLnet/minecraft/client/report/ChatLog;streamBackward()Lnet/minecraft/client/report/ChatLog$Streams;
-
streamForward
Returns the streams starting fromstartIndexwith entires ordered chronologically (in ascending order).- Returns:
- the streams starting from
startIndexwith entires ordered chronologically (in ascending order) - Implementation Note:
- If
startIndexis not in the log, this returnsemptyStreams(). - Mappings:
Namespace Name Mixin selector official fLeuj;f(I)Leuj$a;intermediary method_44546Lnet/minecraft/class_7555;method_44546(I)Lnet/minecraft/class_7555$class_7556;named streamForwardLnet/minecraft/client/report/ChatLog;streamForward(I)Lnet/minecraft/client/report/ChatLog$Streams;
-
streamBackward
Returns the streams starting fromstartIndexwith entires ordered antichronologically (in descending order).- Returns:
- the streams starting from
startIndexwith entires ordered antichronologically (in descending order) - Implementation Note:
- If
startIndexis not in the log, this returnsemptyStreams(). - Mappings:
Namespace Name Mixin selector official gLeuj;g(I)Leuj$a;intermediary method_44547Lnet/minecraft/class_7555;method_44547(I)Lnet/minecraft/class_7555$class_7556;named streamBackwardLnet/minecraft/client/report/ChatLog;streamBackward(I)Lnet/minecraft/client/report/ChatLog$Streams;
-
streamForward
Returns the streams starting fromstartIndexwith entires ordered chronologically (in ascending order) up to and includingendIndex.- Returns:
- the streams starting from
startIndexwith entires ordered chronologically (in ascending order) up to and includingendIndex - Implementation Note:
- If either
startIndexorendIndexis not in the log, this returnsemptyStreams(). - Mappings:
Namespace Name Mixin selector official cLeuj;c(II)Leuj$a;intermediary method_44541Lnet/minecraft/class_7555;method_44541(II)Lnet/minecraft/class_7555$class_7556;named streamForwardLnet/minecraft/client/report/ChatLog;streamForward(II)Lnet/minecraft/client/report/ChatLog$Streams;
-
stream
Returns the streams starting fromstartIndex.- Parameters:
nextIndexGetter- a function that, when given an index, returns the next index or -1 to indicate the end of the stream- Returns:
- the streams starting from
startIndex - Implementation Note:
- If
startIndexis not in the log, this returnsemptyStreams(). - Mappings:
Namespace Name Mixin selector official aLeuj;a(ILjava/util/function/IntUnaryOperator;)Leuj$a;intermediary method_44534Lnet/minecraft/class_7555;method_44534(ILjava/util/function/IntUnaryOperator;)Lnet/minecraft/class_7555$class_7556;named streamLnet/minecraft/client/report/ChatLog;stream(ILjava/util/function/IntUnaryOperator;)Lnet/minecraft/client/report/ChatLog$Streams;
-
emptyStreams
Returns the empty stream.- Returns:
- the empty stream
- Mappings:
Namespace Name Mixin selector official eLeuj;e()Leuj$a;intermediary method_44542Lnet/minecraft/class_7555;method_44542()Lnet/minecraft/class_7555$class_7556;named emptyStreamsLnet/minecraft/client/report/ChatLog;emptyStreams()Lnet/minecraft/client/report/ChatLog$Streams;
-