A full-state snapshot of a player: their entire inventory and vital attributes. Part of the IRC schema reference; this is the payload a peer pushes every few seconds per online user to keep them present on the network.
There is no player field — a snapshot is the sender's own by definition, and receivers read who it describes from the meta event's uuid. Coalescing on the mesh keys on that sender too.
{
"type": "presence",
"inventory": [
{
"slot": 0,
"item": {
"id": "minecraft:netherite_sword",
"count": 1,
"damage": 12,
"maxDamage": 2031
}
},
{
"slot": 1,
"item": {
"id": "minecraft:ender_pearl",
"count": 16
}
}
],
"attributes": {
"absorption": 0,
"health": 20,
"hunger": 20,
"oxygen": 300,
"saturation": 5
}
}| Field | Type | Constraints |
|---|---|---|
type | "presence" | Discriminator |
inventory | array of inventory slots | The whole inventory. May be empty. |
attributes | object | All five fields required — see below |
| Attribute | Type | Meaning |
|---|---|---|
health | number | Hearts × 2 (20 = full) |
absorption | number | Absorption hearts × 2 |
hunger | number | Food level (20 = full) |
saturation | number | Hidden saturation reserve |
oxygen | number | Air supply (300 = full) |
Presence is idempotent state: each update carries everything, so a newer one strictly replaces an older one. That is what lets the mesh coalesce — of several updates queued for one recipient, only the newest per UUID is written. Never send partial snapshots and rely on earlier ones surviving; between any two frames a recipient sees, any number of yours may have been superseded.
A session whose presence stops arriving is marked stale after 15 seconds; clients age it out visually.