CLASS net/minecraft/class_2556 net/minecraft/network/MessageType COMMENT A message type (also known as "chat type") controls whether to display or narrate COMMENT the messages sent to the clients, and if so, how. Message types are registered COMMENT at {@link net.minecraft.util.registry.BuiltinRegistries#MESSAGE_TYPE}. When COMMENT sending a message, the registry key of the message type can be passed to indicate COMMENT which message type should be used. COMMENT COMMENT

Message type has three fields, all of which are optional. If the field is empty, COMMENT the message is not displayed or narrated there. COMMENT

COMMENT COMMENT

The display rules and the narration rule can optionally have a "decoration", which is an COMMENT instance of {@link Decoration}. Decorations are pre-defined message formatting and COMMENT styling rules, which can be {@linkplain Decoration#apply applied} to the message to COMMENT produce the displayed or narrated text. If there is no decoration, the message is used COMMENT without any extra processing. See the documentation for {@link MessageType.DisplayRule} COMMENT and {@link MessageType.NarrationRule} for details. COMMENT COMMENT @see net.minecraft.server.PlayerManager#broadcast(Text, RegistryKey) FIELD comp_792 Ljava/util/Optional; COMMENT the display rule for the content displayed in the chat hud, or COMMENT {@link Optional#empty()} if it should not be displayed in the chat hud FIELD comp_793 Ljava/util/Optional; COMMENT the display rule for the content displayed as the overlay, or COMMENT {@link Optional#empty()} if it should not be displayed as the overlay FIELD comp_794 Ljava/util/Optional; COMMENT the narration rule for the content, or {@link Optional#empty()} COMMENT if it should not be narrated FIELD field_11733 Lnet/minecraft/class_5321; COMMENT The registry key for the game info message type. This appears on the overlay only COMMENT and is not narrated at all. This message type does not have a decoration. COMMENT COMMENT @apiNote This is most often seen when the player uses a bed. FIELD field_11735 Lnet/minecraft/class_5321; COMMENT The registry key for the system message message type. This is also referred to COMMENT as {@linkplain net.minecraft.network.packet.s2c.play.GameMessageS2CPacket game COMMENT messages}. This message type does not have a decoration and its narrations will COMMENT interrupt others. COMMENT COMMENT @apiNote System messages include join/leave messages, death messages, COMMENT advancement messages, and other messages that are not sent by players. FIELD field_11737 Lnet/minecraft/class_5321; COMMENT The registry key for the message type used by {@link COMMENT net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket chat messages}. COMMENT The message content is {@linkplain Decoration#ofChat decorated} using the COMMENT {@code chat.type.text} text. FIELD field_39227 CODEC Lcom/mojang/serialization/Codec; FIELD field_39228 Lnet/minecraft/class_5321; COMMENT The registry key for the say command message type, used by {@linkplain COMMENT net.minecraft.server.command.SayCommand /say}. The message content is COMMENT {@linkplain Decoration#ofChat decorated} using the {@code chat.type.announcement} COMMENT text. FIELD field_39229 Lnet/minecraft/class_5321; COMMENT The registry key for the message command message type, used by {@linkplain COMMENT net.minecraft.server.command.MessageCommand /msg}. The message content is COMMENT {@linkplain Decoration#ofDirectMessage decorated} using the COMMENT {@code commands.message.display.incoming} text, and the text is italicized and colored COMMENT gray. FIELD field_39230 Lnet/minecraft/class_5321; COMMENT The registry key for the team message command message type, used by {@linkplain COMMENT net.minecraft.server.command.TeamMsgCommand /teammsg}. The message content is COMMENT {@linkplain Decoration#ofTeamMessage decorated} using the COMMENT {@code chat.type.team.text} text. FIELD field_39231 Lnet/minecraft/class_5321; COMMENT The registry key for the emote command message type, used by {@linkplain COMMENT net.minecraft.server.command.MeCommand /me}. The message content is COMMENT {@linkplain Decoration#ofChat decorated} using the {@code chat.type.emote} text. FIELD field_39232 Lnet/minecraft/class_5321; COMMENT The registry key for the tellraw command message type, used by {@linkplain COMMENT net.minecraft.server.command.TellRawCommand /tellraw}. This message type COMMENT does not have a decoration. METHOD method_43843 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; ARG 0 instance METHOD method_43844 initialize (Lnet/minecraft/class_2378;)Lnet/minecraft/class_6880; ARG 0 registry METHOD method_43845 register (Ljava/lang/String;)Lnet/minecraft/class_5321; ARG 0 id CLASS class_7466 NarrationRule COMMENT The narration rule for the message type. This contains the decoration applied COMMENT to the message and the kind of the narration ({@code priority} when serialized). FIELD comp_795 Ljava/util/Optional; COMMENT the decoration applied to a message, or {@link Optional#empty()} if the content COMMENT is narrated as is FIELD comp_796 kind Lnet/minecraft/class_2556$class_7466$class_7467; COMMENT the kind of the narration, also known as {@code priority} in the serialized COMMENT format FIELD field_39233 CODEC Lcom/mojang/serialization/Codec; METHOD comp_796 kind ()Lnet/minecraft/class_2556$class_7466$class_7467; METHOD method_43846 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; ARG 0 instance METHOD method_43847 of (Lnet/minecraft/class_7463;Lnet/minecraft/class_2556$class_7466$class_7467;)Lnet/minecraft/class_2556$class_7466; COMMENT {@return the narration rule with the specified decoration and kind} ARG 0 decoration ARG 1 kind METHOD method_43848 of (Lnet/minecraft/class_2556$class_7466$class_7467;)Lnet/minecraft/class_2556$class_7466; COMMENT {@return the narration rule with no decoration and the specified kind} COMMENT COMMENT

This does not mean the message is not narrated; this means that the message COMMENT is narrated as is without any extra processing. ARG 0 priority METHOD method_43849 apply (Lnet/minecraft/class_2561;Lnet/minecraft/class_7436;)Lnet/minecraft/class_2561; COMMENT {@return the message with the decoration applied, or {@code message} if there is COMMENT no decoration} ARG 1 message ARG 2 sender METHOD method_43850 (Lnet/minecraft/class_2561;Lnet/minecraft/class_7436;Lnet/minecraft/class_7463;)Lnet/minecraft/class_2561; ARG 2 decoration CLASS class_7467 Kind COMMENT The kind of narration. This is also known as priority, because it determines COMMENT if the incoming narration should interrupt the current one. This is also used COMMENT to check if the message {@linkplain net.minecraft.client.option.NarratorMode#shouldNarrate COMMENT should be narrated} when the narrator option is set to "Chat" or "System". FIELD field_39236 CODEC Lcom/mojang/serialization/Codec; FIELD field_39237 name Ljava/lang/String; FIELD field_39238 interrupt Z METHOD (Ljava/lang/String;ILjava/lang/String;Z)V ARG 3 name ARG 4 interrupt METHOD method_43851 shouldInterrupt ()Z COMMENT {@return whether the message has priority over others and should interrupt COMMENT their narrations} CLASS class_7468 DisplayRule COMMENT The display rule for the message type. This contains the decoration applied COMMENT to the message. FIELD comp_797 Ljava/util/Optional; COMMENT the decoration applied to a message, or {@link Optional#empty()} if the content COMMENT is displayed as is FIELD field_39240 CODEC Lcom/mojang/serialization/Codec; METHOD method_43853 of ()Lnet/minecraft/class_2556$class_7468; COMMENT {@return the display rule with no decoration} COMMENT COMMENT

This does not mean the message is not displayed; this means that the message COMMENT is displayed as is without any extra processing. METHOD method_43854 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; ARG 0 instance METHOD method_43855 of (Lnet/minecraft/class_7463;)Lnet/minecraft/class_2556$class_7468; COMMENT {@return the display rule with the specified decoration} ARG 0 decoration METHOD method_43856 apply (Lnet/minecraft/class_2561;Lnet/minecraft/class_7436;)Lnet/minecraft/class_2561; COMMENT {@return the message with the decoration applied, or {@code message} if there is COMMENT no decoration} ARG 1 message ARG 2 sender METHOD method_43857 (Lnet/minecraft/class_2561;Lnet/minecraft/class_7436;Lnet/minecraft/class_7463;)Lnet/minecraft/class_2561; ARG 2 decoration