Package net.minecraft.network.chat
Record Class ChatType.Bound
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ChatType.Bound
- Enclosing class:
ChatType
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thechatTyperecord component.private final ComponentThe field for thenamerecord component.static final StreamCodec<RegistryFriendlyByteBuf, ChatType.Bound> The field for thetargetNamerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchatType()Returns the value of thechatTyperecord component.decorateNarration(Component pContent) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thetargetNamerecord component.final StringtoString()Returns a string representation of this record class.withTargetName(Component pTargetName)
-
Field Details
-
chatType
The field for thechatTyperecord component. -
name
The field for thenamerecord component. -
targetName
The field for thetargetNamerecord component. -
STREAM_CODEC
-
-
Constructor Details
-
Bound
-
Bound
Creates an instance of aBoundrecord class.- Parameters:
chatType- the value for thechatTyperecord componentname- the value for thenamerecord componenttargetName- the value for thetargetNamerecord component
-
-
Method Details
-
decorate
-
decorateNarration
-
withTargetName
-
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). -
chatType
Returns the value of thechatTyperecord component.- Returns:
- the value of the
chatTyperecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
targetName
Returns the value of thetargetNamerecord component.- Returns:
- the value of the
targetNamerecord component
-