Skip to content

Quick Start

github-actions[bot] edited this page Sep 28, 2026 · 2 revisions

Quick start

  1. Install this client and mcbe-ipc (pack-to-pack messaging) in your pack.
  2. If you query the catalog (get / list / match), a host pack must be enabled on the world. UUID-depend on it only if your addon cannot function without those queries.
  3. Wait until the host answers, register your documents, then query:
import { createBedrockClient } from "@mcbe-registry/client/bedrock";
import { BOTTLE, BUCKET, LOOT_TOOL_NONE } from "@mcbe-registry/client";

const registry = createBedrockClient();

const ok = await registry.waitReady();
if (ok) {
  registry.add("block", { id: "mymod:crusher" });
  await registry.register({ source: "mymod", kind: "block" });

  registry.add("item", { id: "mymod:widget", tags: ["mymod:parts"] });
  await registry.register({ source: "mymod", kind: "item" });

  registry.add("fluid", {
    id: "mymod:latex",
    kind: "liquid",
    vessels: [
      { filled: "mymod:latex_bottle", empty: "minecraft:glass_bottle", amount: BOTTLE },
      { filled: "mymod:latex_bucket", empty: "minecraft:bucket", amount: BUCKET },
    ],
  });
  await registry.register({ source: "mymod", kind: "fluid" });

  registry.add("recipe", {
    id: "mymod:crush_cobble",
    stations: ["mymod:crusher"],
    inputs: ["minecraft:cobblestone"],
    outputs: ["minecraft:gravel"],
  });
  await registry.register({ source: "mymod", kind: "recipe" });

  await registry.get("item", "mymod:widget");
  await registry.get("fluid", "mymod:latex");
  await registry.list("loot", { block: "minecraft:diamond_ore" });
  await registry.list("loot", { tool: LOOT_TOOL_NONE });
}

source is your pack’s id (lowercase, stable across reloads). kind is which catalog table you are writing. Vanilla documents are already on the host; the minecraft:diamond_ore list call reads those, not something you registered.

waitReady() is false when the host is missing, slow, or built for a different client. If you only register and never query, use the Register template instead.

Next: Registering · Asking the catalog · API reference

Clone this wiki locally