Record Class ReceivedMessage.ChatMessage
java.lang.Object
java.lang.Record
net.minecraft.client.session.report.log.ReceivedMessage.ChatMessage
- Record Components:
profile-message-trustStatus-
- All Implemented Interfaces:
ChatLogEntry,ReceivedMessage
- Enclosing interface:
ReceivedMessage
@Environment(CLIENT)
public static record ReceivedMessage.ChatMessage(com.mojang.authlib.GameProfile profile, SignedMessage message, MessageTrustStatus trustStatus)
extends Record
implements ReceivedMessage
A chat message received by the client.
- Mappings:
Namespace Name named net/minecraft/client/session/report/log/ReceivedMessage$ChatMessageintermediary net/minecraft/class_7557$class_7558official gad$anamed profileintermediary comp_868official cnamed messageintermediary comp_870official dnamed trustStatusintermediary comp_905official e
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.session.report.log.ChatLogEntry
ChatLogEntry.TypeNested classes/interfaces inherited from interface net.minecraft.client.session.report.log.ReceivedMessage
ReceivedMessage.ChatMessage, ReceivedMessage.GameMessage -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ReceivedMessage.ChatMessage> private static final DateTimeFormatterprivate final SignedMessageThe field for themessagerecord component.private final com.mojang.authlib.GameProfileThe field for theprofilerecord component.private final MessageTrustStatusThe field for thetrustStatusrecord component.Fields inherited from interface net.minecraft.client.session.report.log.ChatLogEntry
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionChatMessage(com.mojang.authlib.GameProfile gameProfile, SignedMessage signedMessage, MessageTrustStatus messageTrustStatus) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the content of the message.private TextReturns the formatted timestamp text of this message.Returns the heading text used by Chat Selection screen.Returns the narration of the message (by default, the content).Returns the UUID of the sender.getType()final inthashCode()Returns a hash code value for this object.booleanisSentFrom(UUID uuid) Returns whether the sender's UUID equalsuuid.message()Returns the value of themessagerecord component.com.mojang.authlib.GameProfileprofile()Returns the value of theprofilerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrustStatusrecord component.
-
Field Details
-
profile
private final com.mojang.authlib.GameProfile profileThe field for theprofilerecord component. -
message
The field for themessagerecord component. -
trustStatus
The field for thetrustStatusrecord component. -
CHAT_MESSAGE_CODEC
public static final com.mojang.serialization.MapCodec<ReceivedMessage.ChatMessage> CHAT_MESSAGE_CODEC- Mappings:
Namespace Name Mixin selector named CHAT_MESSAGE_CODECLnet/minecraft/client/session/report/log/ReceivedMessage$ChatMessage;CHAT_MESSAGE_CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_40809Lnet/minecraft/class_7557$class_7558;field_40809:Lcom/mojang/serialization/MapCodec;official bLgad$a;b:Lcom/mojang/serialization/MapCodec;
-
DATE_TIME_FORMATTER
- Mappings:
Namespace Name Mixin selector named DATE_TIME_FORMATTERLnet/minecraft/client/session/report/log/ReceivedMessage$ChatMessage;DATE_TIME_FORMATTER:Ljava/time/format/DateTimeFormatter;intermediary field_39637Lnet/minecraft/class_7557$class_7558;field_39637:Ljava/time/format/DateTimeFormatter;official fLgad$a;f:Ljava/time/format/DateTimeFormatter;
-
-
Constructor Details
-
ChatMessage
public ChatMessage(com.mojang.authlib.GameProfile gameProfile, SignedMessage signedMessage, MessageTrustStatus messageTrustStatus)
-
-
Method Details
-
getContent
Returns the content of the message.- Specified by:
getContentin interfaceReceivedMessage- Returns:
- the content of the message
- Implementation Note:
- If the message is a chat message and it contains an unsigned part, the unsigned part will be returned. Note that in vanilla, unsigned part is stripped prior to construction of the received message instance if the client requires secure chat.
- Mappings:
Namespace Name Mixin selector named getContentLnet/minecraft/client/session/report/log/ReceivedMessage;getContent()Lnet/minecraft/text/Text;intermediary method_44551Lnet/minecraft/class_7557;method_44551()Lnet/minecraft/class_2561;official bLgad;b()Lwz;
-
getNarration
Returns the narration of the message (by default, the content).- Specified by:
getNarrationin interfaceReceivedMessage- Returns:
- the narration of the message (by default, the content)
- Mappings:
Namespace Name Mixin selector named getNarrationLnet/minecraft/client/session/report/log/ReceivedMessage;getNarration()Lnet/minecraft/text/Text;intermediary method_44555Lnet/minecraft/class_7557;method_44555()Lnet/minecraft/class_2561;official cLgad;c()Lwz;
-
getHeadingText
Returns the heading text used by Chat Selection screen.The text contains the sender's display name and the formatted timestamp.
- Returns:
- the heading text used by Chat Selection screen
- Mappings:
Namespace Name Mixin selector named getHeadingTextLnet/minecraft/client/session/report/log/ReceivedMessage$ChatMessage;getHeadingText()Lnet/minecraft/text/Text;intermediary method_44556Lnet/minecraft/class_7557$class_7558;method_44556()Lnet/minecraft/class_2561;official dLgad$a;d()Lwz;
-
getFormattedTimestamp
Returns the formatted timestamp text of this message.- Returns:
- the formatted timestamp text of this message
- Mappings:
Namespace Name Mixin selector named getFormattedTimestampLnet/minecraft/client/session/report/log/ReceivedMessage$ChatMessage;getFormattedTimestamp()Lnet/minecraft/text/Text;intermediary method_44558Lnet/minecraft/class_7557$class_7558;method_44558()Lnet/minecraft/class_2561;official iLgad$a;i()Lwz;
-
isSentFrom
Returns whether the sender's UUID equalsuuid.- Specified by:
isSentFromin interfaceReceivedMessage- Returns:
- whether the sender's UUID equals
uuid - Mappings:
Namespace Name Mixin selector named isSentFromLnet/minecraft/client/session/report/log/ReceivedMessage;isSentFrom(Ljava/util/UUID;)Zintermediary method_44553Lnet/minecraft/class_7557;method_44553(Ljava/util/UUID;)Zofficial aLgad;a(Ljava/util/UUID;)Z
-
getSenderUuid
Returns the UUID of the sender.- Returns:
- the UUID of the sender
- Mappings:
Namespace Name Mixin selector named getSenderUuidLnet/minecraft/client/session/report/log/ReceivedMessage$ChatMessage;getSenderUuid()Ljava/util/UUID;intermediary method_44557Lnet/minecraft/class_7557$class_7558;method_44557()Ljava/util/UUID;official eLgad$a;e()Ljava/util/UUID;
-
getType
- Specified by:
getTypein interfaceChatLogEntry- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/client/session/report/log/ChatLogEntry;getType()Lnet/minecraft/client/session/report/log/ChatLogEntry$Type;intermediary method_46538Lnet/minecraft/class_7629;method_46538()Lnet/minecraft/class_7629$class_7854;official aLgac;a()Lgac$a;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
profile
public com.mojang.authlib.GameProfile profile()Returns the value of theprofilerecord component.- Returns:
- the value of the
profilerecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
trustStatus
Returns the value of thetrustStatusrecord component.- Returns:
- the value of the
trustStatusrecord component
-