---
title: Set Structure Block
description: "Play 0x3B, client → server."
---

`play` · `0x3B` · **serverbound** (client → server)

Sent when the player interacts with a structure block GUI. `action` is update data, save, load, or detect size; `mode`, `name`, offsets, sizes, `mirror`, `rotation`, `metadata`, `integrity`, and `seed` are the new settings. Operator-only; the server updates the block entity and runs the action.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `location` | Position | also `position` |
| `action` | VarInt |  |
| `mode` | VarInt |  |
| `name` | String |  |
| `offset_x` | Byte |  |
| `offset_y` | Byte |  |
| `offset_z` | Byte |  |
| `size_x` | Byte |  |
| `size_y` | Byte |  |
| `size_z` | Byte |  |
| `mirror` | VarInt |  |
| `rotation` | VarInt |  |
| `metadata` | String |  |
| `integrity` | Float |  |
| `seed` | VarInt |  |
| `flags` | UByte | Enum: `0` ignore_entities, `1` show_air, `2` show_bounding_box, `3` strict. |

## Send it

```ts
await client.sendPacket("SetStructureBlock", {
  location: /* Position */,
  action: /* VarInt */,
  mode: /* VarInt */,
  name: /* String */,
  offset_x: /* Byte */,
  offset_y: /* Byte */,
  offset_z: /* Byte */,
  size_x: /* Byte */,
  size_y: /* Byte */,
  size_z: /* Byte */,
  mirror: /* VarInt */,
  rotation: /* VarInt */,
  metadata: /* String */,
  integrity: /* Float */,
  seed: /* VarInt */,
  flags: /* UByte */,
});
```

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

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