Package net.minecraft.client.report.log
Interface ChatLog
- All Known Implementing Classes:
ChatLogImpl
A chat log holds received message entries with sequential indices, where
newer entries receive bigger indices. An implementation using fixed-size array
is available at
ChatLogImpl.
There are two types of entries. HeaderEntry is an entry containing only
the message's header, and is used for censored messages. ReceivedMessage
is an entry for full chat or game messages.
- Mappings:
Namespace Name official evfintermediary net/minecraft/class_7555named net/minecraft/client/report/log/ChatLog
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordChatLog.IndexedEntry<T extends ChatLogEntry>A pair of the entry's index and the entry itself.static classA set of streams of log entries. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ChatLogEntry entry) Addsentryto the log.default booleancontains(int index) Returns whether the log contains an entry with indexindex.private ChatLog.StreamsReturns the empty stream.get(int index) Returns the entry with indexindex, ornullif there is no such entry in the log.default @Nullable ChatLog.IndexedEntry<ChatLogEntry>getIndexed(int index) Returns the indexed entry with indexindex, ornullif there is no such entry 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 an entry with that index, or -1 if there is no entry with the offset index.intgetOffsetIndex(int index, int offset) Returns the index offset byoffsetif there is an entry with that index, or -1 if there is no entry with the offset index.default intgetPreviousIndex(int index) Returns the index offset by-1if there is an entry with that index, or -1 if there is no entry 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 aLevf;a:Iintermediary field_39629Lnet/minecraft/class_7555;field_39629:Inamed MISSING_NEXT_INDEXLnet/minecraft/client/report/log/ChatLog;MISSING_NEXT_INDEX:I
-
-
Method Details
-
add
Addsentryto the log.- Mappings:
Namespace Name Mixin selector official aLevf;a(Levi;)Vintermediary method_44535Lnet/minecraft/class_7555;method_44535(Lnet/minecraft/class_7629;)Vnamed addLnet/minecraft/client/report/log/ChatLog;add(Lnet/minecraft/client/report/log/ChatLogEntry;)V
-
get
Returns the entry with indexindex, ornullif there is no such entry in the log.- Returns:
- the entry with index
index, ornullif there is no such entry in the log - Mappings:
Namespace Name Mixin selector official aLevf;a(I)Levi;intermediary method_44532Lnet/minecraft/class_7555;method_44532(I)Lnet/minecraft/class_7629;named getLnet/minecraft/client/report/log/ChatLog;get(I)Lnet/minecraft/client/report/log/ChatLogEntry;
-
getIndexed
Returns the indexed entry with indexindex, ornullif there is no such entry in the log.- Returns:
- the indexed entry with index
index, ornullif there is no such entry in the log - Mappings:
Namespace Name Mixin selector official bLevf;b(I)Levf$a;intermediary method_44537Lnet/minecraft/class_7555;method_44537(I)Lnet/minecraft/class_7555$class_7560;named getIndexedLnet/minecraft/client/report/log/ChatLog;getIndexed(I)Lnet/minecraft/client/report/log/ChatLog$IndexedEntry;
-
contains
default boolean contains(int index) Returns whether the log contains an entry with indexindex.- Returns:
- whether the log contains an entry with index
index - Mappings:
Namespace Name Mixin selector official cLevf;c(I)Zintermediary method_44540Lnet/minecraft/class_7555;method_44540(I)Znamed containsLnet/minecraft/client/report/log/ChatLog;contains(I)Z
-
getOffsetIndex
int getOffsetIndex(int index, int offset) Returns the index offset byoffsetif there is an entry with that index, or -1 if there is no entry with the offset index.- Returns:
- the index offset by
offsetif there is an entry with that index, or -1 if there is no entry with the offset index - Mappings:
Namespace Name Mixin selector official aLevf;a(II)Iintermediary method_44533Lnet/minecraft/class_7555;method_44533(II)Inamed getOffsetIndexLnet/minecraft/client/report/log/ChatLog;getOffsetIndex(II)I
-
getPreviousIndex
default int getPreviousIndex(int index) Returns the index offset by-1if there is an entry with that index, or -1 if there is no entry with the offset index.- Returns:
- the index offset by
-1if there is an entry with that index, or -1 if there is no entry with the offset index - See Also:
- Mappings:
Namespace Name Mixin selector official dLevf;d(I)Iintermediary method_44543Lnet/minecraft/class_7555;method_44543(I)Inamed getPreviousIndexLnet/minecraft/client/report/log/ChatLog;getPreviousIndex(I)I
-
getNextIndex
default int getNextIndex(int index) Returns the index offset by1if there is an entry with that index, or -1 if there is no entry with the offset index.- Returns:
- the index offset by
1if there is an entry with that index, or -1 if there is no entry with the offset index - See Also:
- Mappings:
Namespace Name Mixin selector official eLevf;e(I)Iintermediary method_44545Lnet/minecraft/class_7555;method_44545(I)Inamed getNextIndexLnet/minecraft/client/report/log/ChatLog;getNextIndex(I)I
-
getMaxIndex
int getMaxIndex()Returns the maximum index currently used within the log.This value changes every time a new entry gets added. The entry 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 aLevf;a()Iintermediary method_44531Lnet/minecraft/class_7555;method_44531()Inamed getMaxIndexLnet/minecraft/client/report/log/ChatLog;getMaxIndex()I
-
getMinIndex
int getMinIndex()Returns the minimum index currently used within the log.This value can change every time a new entry gets added. The entry 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 bLevf;b()Iintermediary method_44536Lnet/minecraft/class_7555;method_44536()Inamed getMinIndexLnet/minecraft/client/report/log/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 cLevf;c()Levf$b;intermediary method_44539Lnet/minecraft/class_7555;method_44539()Lnet/minecraft/class_7555$class_7556;named streamForwardLnet/minecraft/client/report/log/ChatLog;streamForward()Lnet/minecraft/client/report/log/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 dLevf;d()Levf$b;intermediary method_44702Lnet/minecraft/class_7555;method_44702()Lnet/minecraft/class_7555$class_7556;named streamBackwardLnet/minecraft/client/report/log/ChatLog;streamBackward()Lnet/minecraft/client/report/log/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 fLevf;f(I)Levf$b;intermediary method_44546Lnet/minecraft/class_7555;method_44546(I)Lnet/minecraft/class_7555$class_7556;named streamForwardLnet/minecraft/client/report/log/ChatLog;streamForward(I)Lnet/minecraft/client/report/log/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 gLevf;g(I)Levf$b;intermediary method_44547Lnet/minecraft/class_7555;method_44547(I)Lnet/minecraft/class_7555$class_7556;named streamBackwardLnet/minecraft/client/report/log/ChatLog;streamBackward(I)Lnet/minecraft/client/report/log/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 bLevf;b(II)Levf$b;intermediary method_44541Lnet/minecraft/class_7555;method_44541(II)Lnet/minecraft/class_7555$class_7556;named streamForwardLnet/minecraft/client/report/log/ChatLog;streamForward(II)Lnet/minecraft/client/report/log/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 aLevf;a(ILjava/util/function/IntUnaryOperator;)Levf$b;intermediary method_44534Lnet/minecraft/class_7555;method_44534(ILjava/util/function/IntUnaryOperator;)Lnet/minecraft/class_7555$class_7556;named streamLnet/minecraft/client/report/log/ChatLog;stream(ILjava/util/function/IntUnaryOperator;)Lnet/minecraft/client/report/log/ChatLog$Streams;
-
emptyStreams
Returns the empty stream.- Returns:
- the empty stream
- Mappings:
Namespace Name Mixin selector official eLevf;e()Levf$b;intermediary method_44542Lnet/minecraft/class_7555;method_44542()Lnet/minecraft/class_7555$class_7556;named emptyStreamsLnet/minecraft/client/report/log/ChatLog;emptyStreams()Lnet/minecraft/client/report/log/ChatLog$Streams;
-