MCBE
OverviewPacketsText
ID 0x09 · 9BothUI

Text

Chat, system messages, popups, tips, whispers and translations. Since the 1.26.40 cereal migration the per-type body is a tagged variant instead of a flat type byte + conditionals.

text.bin
struct Text {
  bool                                         Localize;
  tagged case index (0=MessageOnly, 1=AuthorAndMessage, 2=MessageAndParams) Body;
  string                                       Xuid;
  string                                       PlatformId;
  optional byte + string                       FilteredMessage;
}

Structure

FieldTypeDescription
Localizebool
Bodytagged case index (0=MessageOnly, 1=AuthorAndMessage, 2=MessageAndParams)Variant: an index selects the payload type — see the tables below.
Xuidstring
Platform Idstring
Filtered Messageoptional byte + stringPresence flag on the wire; value omitted when absent.

Structure of MessageOnly

FieldTypeDescription
TypeTextPacketType
Messagestring

Structure of AuthorAndMessage

FieldTypeDescription
TypeTextPacketType
Authorstring
Messagestring

Structure of MessageAndParams

FieldTypeDescription
TypeTextPacketType
Messagestring
Paramsvaruint32 count + string[]Length-prefixed sequence.

TextPacketType values

0 Raw
1 Chat
2 Translate
3 Popup
4 JukeboxPopup
5 Tip
6 SystemMessage
7 Whisper
8 Announcement
9 TextObjectWhisper
10 TextObject
11 TextObjectAnnouncement

Notes

  • The Body variant is selected by a leading tag; each alternative embeds its TextPacketType byte.
  • MessageOnly covers raw/tip/system/text-object types; AuthorAndMessage covers chat/whisper/announcement; MessageAndParams covers translate/popup/jukebox-popup.
  • XUID and PlatformId identify the sender; Filtered Message (optional) is the profanity-filtered body.