Package net.minecraft.network.chat
Record Class ChatType
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ChatType
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChatTypeDecorationThe field for thechatrecord component.static final ResourceKey<ChatType> static final ChatTypeDecorationstatic final com.mojang.serialization.Codec<ChatType> static final StreamCodec<RegistryFriendlyByteBuf, ChatType> static final ResourceKey<ChatType> static final ResourceKey<ChatType> static final ResourceKey<ChatType> private final ChatTypeDecorationThe field for thenarrationrecord component.static final ResourceKey<ChatType> static final StreamCodec<RegistryFriendlyByteBuf, Holder<ChatType>> static final ResourceKey<ChatType> static final ResourceKey<ChatType> -
Constructor Summary
ConstructorsConstructorDescriptionChatType(ChatTypeDecoration chat, ChatTypeDecoration narration) Creates an instance of aChatTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatType.Boundbind(ResourceKey<ChatType> pChatTypeKey, CommandSourceStack pSource) static ChatType.Boundbind(ResourceKey<ChatType> pChatTypeKey, RegistryAccess pRegistryAccess, Component pName) static ChatType.Boundbind(ResourceKey<ChatType> pChatTypeKey, Entity pEntity) static voidbootstrap(BootstrapContext<ChatType> pContext) chat()Returns the value of thechatrecord component.private static ResourceKey<ChatType> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenarrationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
chat
The field for thechatrecord component. -
narration
The field for thenarrationrecord component. -
DIRECT_CODEC
-
DIRECT_STREAM_CODEC
-
STREAM_CODEC
-
DEFAULT_CHAT_DECORATION
-
CHAT
-
SAY_COMMAND
-
MSG_COMMAND_INCOMING
-
MSG_COMMAND_OUTGOING
-
TEAM_MSG_COMMAND_INCOMING
-
TEAM_MSG_COMMAND_OUTGOING
-
EMOTE_COMMAND
-
-
Constructor Details
-
ChatType
Creates an instance of aChatTyperecord class.- Parameters:
chat- the value for thechatrecord componentnarration- the value for thenarrationrecord component
-
-
Method Details
-
create
-
bootstrap
-
bind
-
bind
-
bind
public static ChatType.Bound bind(ResourceKey<ChatType> pChatTypeKey, RegistryAccess pRegistryAccess, Component pName) -
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). -
chat
Returns the value of thechatrecord component.- Returns:
- the value of the
chatrecord component
-
narration
Returns the value of thenarrationrecord component.- Returns:
- the value of the
narrationrecord component
-