---
title: Block Entity Data
description: "Play 0x06, server → client."
---

`play` · `0x06` · **clientbound** (server → client)

Updates the block entity at `location` with new NBT data, such as a sign's text, a mob spawner's settings, or a banner pattern. `action` identifies the block entity type. The client applies the NBT to its local copy of the block entity.

Sent by the server, read by the client. Listen for it with `client.on("BlockEntityData", (data) => …)` on the receiving side.

## Fields

| Field | Type | Notes |
|---|---|---|
| `location` | Position | also `position` |
| `action` | VarInt |  |
| `nbtData` | writeAnonOptionalNbt |  |

## Send it

```ts
await client.sendPacket("BlockEntityData", {
  location: /* Position */,
  action: /* VarInt */,
  nbtData: /* writeAnonOptionalNbt */,
});
```

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: [`src/Core/Versions/776/Packets/play/clientbound/BlockEntityData.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/play/clientbound/BlockEntityData.ts)
