---
title: Set Border Warning Distance
description: "Play 0x5C, server → client."
---

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

Sets how close, in blocks, the player must be to the world border before the screen shows a red warning tint. The server sends it when the warning distance changes.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `warningBlocks` | VarInt |  |

## Send it

```ts
await client.sendPacket("SetBorderWarningDistance", {
  warningBlocks: /* VarInt */,
});
```

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

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