Package net.minecraft.network.chat
Record Class ChatType
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ChatType
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ChatTypeDecoration
The field for thechat
record component.static final ResourceKey<ChatType>
static final com.mojang.serialization.Codec<ChatType>
static final ChatTypeDecoration
static final ResourceKey<ChatType>
static final ResourceKey<ChatType>
static final ResourceKey<ChatType>
private final ChatTypeDecoration
The field for thenarration
record component.static final ResourceKey<ChatType>
static final ResourceKey<ChatType>
static final ResourceKey<ChatType>
-
Constructor Summary
ConstructorDescriptionChatType
(ChatTypeDecoration chat, ChatTypeDecoration narration) Creates an instance of aChatType
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatType.Bound
bind
(ResourceKey<ChatType> p_241345_, CommandSourceStack p_241466_) static ChatType.Bound
bind
(ResourceKey<ChatType> p_241284_, RegistryAccess p_241373_, Component p_241455_) static ChatType.Bound
bind
(ResourceKey<ChatType> p_241279_, Entity p_241483_) static void
bootstrap
(BootstapContext<ChatType> p_256390_) chat()
Returns the value of thechat
record component.private static ResourceKey<ChatType>
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thenarration
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
chat
The field for thechat
record component. -
narration
The field for thenarration
record component. -
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 aChatType
record class.- Parameters:
chat
- the value for thechat
record componentnarration
- the value for thenarration
record component
-
-
Method Details
-
create
-
bootstrap
-
bind
-
bind
-
bind
public static ChatType.Bound bind(ResourceKey<ChatType> p_241284_, RegistryAccess p_241373_, Component p_241455_) -
bind
-
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 thechat
record component.- Returns:
- the value of the
chat
record component
-
narration
Returns the value of thenarration
record component.- Returns:
- the value of the
narration
record component
-