Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Initialize Border

Play 0x2B, server → client.

play · 0x2B · clientbound (server → client)

Sends the full world border state: center x/z, old and new diameter, the speed in milliseconds to interpolate between them, the portal teleport boundary, and the warning distance and time. The server sends it after login and after a dimension change. The client creates its local world border from these values.

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

Fields

Field Type Notes
x Double
z Double
oldDiameter Double
newDiameter Double
speed VarLong
portalTeleportBoundary VarInt
warningBlocks VarInt
warningTime VarInt

Send it

await client.sendPacket("InitializeBorder", {
  x: /* Double */,
  z: /* Double */,
  oldDiameter: /* Double */,
  newDiameter: /* Double */,
  speed: /* VarLong */,
  portalTeleportBoundary: /* VarInt */,
  warningBlocks: /* VarInt */,
  warningTime: /* VarInt */,
});

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

Source: src/Core/Versions/776/Packets/play/clientbound/InitializeBorder.ts

Was this page helpful?