Interface Packets
Packets for UI and player-facing communication — chat messages, notifications, kill feed, titles, HUD, and custom pages.
Summary
Section titled “Summary”| ID | Packet | Direction | Description |
|---|---|---|---|
| 210 | ServerMessage | S->C | System message |
| 211 | ChatMessage | Both | Chat message |
| 212 | Notification | S->C | UI notification |
| 213 | KillFeedMessage | S->C | Kill feed entry |
| 214 | ShowEventTitle | S->C | Show title |
| 215 | HideEventTitle | S->C | Hide title |
| 216 | SetPage | S->C | Set UI page |
| 217 | CustomHud | S->C | Custom HUD |
| 218 | CustomPage | S->C | Custom page |
| 219 | CustomPageEvent | C->S | Page event |
| 222 | EditorBlocksChange | S->C | Editor blocks |
| 223 | ServerInfo | S->C | Server info |
| 224 | AddToServerPlayerList | S->C | Add to player list |
| 225 | RemoveFromServerPlayerList | S->C | Remove from list |
| 226 | UpdateServerPlayerList | S->C | Update player list |
| 227 | UpdateServerPlayerListPing | S->C | Update pings |
| 228 | UpdateKnownRecipes | S->C | Known recipes |
| 229 | UpdatePortal | S->C | Portal state |
| 230 | UpdateVisibleHudComponents | S->C | HUD visibility |
| 231 | ResetUserInterfaceState | S->C | Reset UI |
| 232 | UpdateLanguage | Both | Language setting |
| 233 | WorldSavingStatus | S->C | Save status |
| 234 | OpenChatWithCommand | S->C | Open chat with command |
ServerMessage
Section titled “ServerMessage”ID: 210 | Direction: S->C
Sends a formatted message to a player. This is the packet written by PlayerRef.sendMessage().
| Field | Type | Description |
|---|---|---|
type | ChatType | Message type (currently only Chat) |
message | FormattedMessage | The message tree (text, styles, params, children) |
The FormattedMessage wire format uses a 34-byte fixed header (null bitmask, style bytes, field offsets) followed by variable-length data (strings, children, parameter maps).
ChatMessage
Section titled “ChatMessage”ID: 211 | Direction: Both
Client-to-server: player sends a chat message or command. Server-to-client: used for chat broadcast.
| Field | Type | Description |
|---|---|---|
message | string | Plain text message |
When the server receives this packet, it routes based on the first character:
/-> dispatched to the command system.-> rejected (local commands not allowed from client)- Otherwise -> fires
PlayerChatEvent, then broadcasts
API: See Messages and PlayerChatEvent
KillFeedMessage
Section titled “KillFeedMessage”ID: 213 | Direction: S->C
Displays an entry in the kill feed UI.
| Field | Type | Description |
|---|---|---|
killer | FormattedMessage | Killer’s display text |
decedent | FormattedMessage | Victim’s display text |
icon | string | Icon asset path |
API: See Kill Feed
Notification
Section titled “Notification”ID: 212 | Direction: S->C
Toast-style popup notification with optional secondary message, icon, item, and style.
| Field | Type | Description |
|---|---|---|
message | FormattedMessage? | Primary notification text |
secondaryMessage | FormattedMessage? | Secondary text below primary |
icon | string? | Icon asset path |
item | ItemWithAllMetadata? | Item to display alongside the notification |
style | NotificationStyle | Default(0), Danger(1), Warning(2), Success(3) |
API: See Notifications
ShowEventTitle
Section titled “ShowEventTitle”ID: 214 | Direction: S->C
Displays a full-screen title/subtitle overlay with fade animations.
| Field | Type | Description |
|---|---|---|
fadeInDuration | float | Fade in time in seconds |
fadeOutDuration | float | Fade out time in seconds |
duration | float | Display time in seconds |
icon | string? | Icon asset path |
isMajor | boolean | Whether to use the larger/more prominent style |
primaryTitle | FormattedMessage? | Main title text |
secondaryTitle | FormattedMessage? | Subtitle text |
API: See Event Titles
HideEventTitle
Section titled “HideEventTitle”ID: 215 | Direction: S->C
Dismisses the currently displayed event title.
| Field | Type | Description |
|---|---|---|
fadeOutDuration | float | Fade out time in seconds (0 for instant) |
API: See Event Titles
CustomHud
Section titled “CustomHud”ID: 217 | Direction: S->C
Sends a custom HUD overlay to the client. Payload is compressed.
| Field | Type | Description |
|---|---|---|
commands | CustomUICommand[] | Array of UI manipulation commands |
Each CustomUICommand has a type, CSS-style selector, and optional document path or value:
| Type | ID | Description |
|---|---|---|
Append | 0 | Add UI document as a child |
AppendInline | 1 | Add inline UI markup as a child |
InsertBefore | 2 | Insert UI document before element |
InsertBeforeInline | 3 | Insert inline UI before element |
Remove | 4 | Remove element |
Set | 5 | Set data on element |
Clear | 6 | Clear element’s children |
API: See Custom HUD
UpdateVisibleHudComponents
Section titled “UpdateVisibleHudComponents”ID: 230 | Direction: S->C
Sets which HUD components are visible for the player. Replaces the full visible set.
| Field | Type | Description |
|---|---|---|
components | HudComponent[] | Array of visible component IDs |
API: See Show/Hide Components
ResetUserInterfaceState
Section titled “ResetUserInterfaceState”ID: 231 | Direction: S->C
Resets all client UI state. Empty packet (no fields).
API: See HUD Reset