Package net.minecraft.network.chat
Record Class ChatMessageContent
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ChatMessageContent
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChatMessageContent(String p_242420_) ChatMessageContent(String plain, Component decorated) Creates an instance of aChatMessageContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedecoratedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanplain()Returns the value of theplainrecord component.static ChatMessageContentread(FriendlyByteBuf p_242370_) final StringtoString()Returns a string representation of this record class.static voidwrite(FriendlyByteBuf p_242211_, ChatMessageContent p_242235_)
-
Field Details
-
plain
The field for theplainrecord component. -
decorated
The field for thedecoratedrecord component.
-
-
Constructor Details
-
ChatMessageContent
-
ChatMessageContent
Creates an instance of aChatMessageContentrecord class.- Parameters:
plain- the value for theplainrecord componentdecorated- the value for thedecoratedrecord 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 theplainrecord component.- Returns:
- the value of the
plainrecord component
-
decorated
Returns the value of thedecoratedrecord component.- Returns:
- the value of the
decoratedrecord component
-