Set Center Chunk
Play 0x5E, server → client.
play · 0x5E · clientbound (server → client)
Tells the client which chunk the player is in. The server sends it before chunk data when the player crosses a chunk boundary. The client uses it to decide which loaded chunks are within view distance and can be kept.
Sent by the server, read by the client. Listen for it with client.on("SetCenterChunk", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
chunkX |
Number | |
chunkZ |
Number |
Send it
await client.sendPacket("SetCenterChunk", { chunkX: 0, chunkZ: 0 });
Send before the first chunk batch and again whenever the player crosses a chunk border. The client discards chunks outside the view distance around this center, so a stale center makes the world vanish.
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/SetCenterChunk.ts