Package net.minecraft.network.chat
Record Class ChatMessageContent
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ChatMessageContent
-
Field Summary
-
Constructor Summary
ConstructorDescriptionChatMessageContent
(String p_242420_) ChatMessageContent
(String plain, Component decorated) Creates an instance of aChatMessageContent
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedecorated
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
plain()
Returns the value of theplain
record component.static ChatMessageContent
read
(FriendlyByteBuf p_242370_) final String
toString()
Returns a string representation of this record class.static void
write
(FriendlyByteBuf p_242211_, ChatMessageContent p_242235_)
-
Field Details
-
plain
The field for theplain
record component. -
decorated
The field for thedecorated
record component.
-
-
Constructor Details
-
ChatMessageContent
-
ChatMessageContent
Creates an instance of aChatMessageContent
record class.- Parameters:
plain
- the value for theplain
record componentdecorated
- the value for thedecorated
record component
-
-
Method Details
-
isDecorated
public boolean isDecorated() -
read
-
write
-
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)
. -
plain
Returns the value of theplain
record component.- Returns:
- the value of the
plain
record component
-
decorated
Returns the value of thedecorated
record component.- Returns:
- the value of the
decorated
record component
-