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

Select Known Packs (serverbound)

Configuration 0x07, client → server.

config · 0x07 · serverbound (client → server)

Answer to the clientbound SelectKnownPacks. The client lists the data packs (namespace, id, version) it already has locally. For each matching pack, the server can omit the registry entries in RegistryData and send only their ids.

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

Fields

Field Type Notes
packs Array also knownPacks

Send it

// Client side, choose packs offered by the server.
client.on("SelectKnownPacks", async (data) => {
  await client.sendPacket("SelectKnownPacks", {
    packs: data.knownPacks.filter((pack) =>
      pack.namespace === "minecraft" && pack.id === "core"
    ),
  });
});

Return only packs the client really has, preserving each offered namespace, id, and version. Send an empty array if none are known; knownPacks is accepted as an alias for packs.

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

Source: src/Core/Versions/776/Packets/config/serverbound/SelectKnownPacks.ts

Was this page helpful?