Skip to content

Asking the Catalog

xXDMOGXx edited this page Aug 21, 2026 · 2 revisions

Asking the catalog

Station

A block type id. Examples: minecraft:furnace, minecraft:blast_furnace, minecraft:crafting_table, mymod:crusher.

Recipes list one or more stations. Every ask uses exactly one.

Bag ask (inputs)

Good for smelting and shapeless / machine bags:

await registry.result({
  station: "minecraft:furnace",
  inputs: ["minecraft:beef"],
});

Two inputs:

await registry.match({
  station: "mymod:alloy_furnace",
  inputs: ["minecraft:iron_ingot", "minecraft:gold_ingot"],
});

Ingredients can be a string type id, or an object with item / tag / count / slot when you need more detail.

Shaped ask (pattern + key)

Same idea as vanilla JSON recipes:

await registry.match({
  station: "minecraft:crafting_table",
  pattern: ["A", "A"],
  key: { A: "minecraft:oak_planks" },
});

Grid ask (grid)

Nine cells, left-to-right, top-to-bottom. Use null for empty:

await registry.result({
  station: "minecraft:crafting_table",
  grid: [
    null, "minecraft:oak_planks", null,
    null, "minecraft:oak_planks", null,
    null, null, null,
  ],
});

match vs result

Method You get
match Recipe ids
result Outputs (and optional leftover / timing fields) — no id

Empty catalog hits: [] (or omitted fields on the wire). That is not an error.

Host missing / timeout: undefined for match / result / get.

Browse (list)

Compact rows: { id, stations, type?, leftover? }no outputs. Filters AND when you set more than one. Timeout → [] (not undefined).

By station:

const furnaceRecipes = await registry.list({
  station: "minecraft:furnace",
});
// e.g. [{ id: "minecraft:furnace_beef", type: "smelt", stations: ["minecraft:furnace"] }, …]

What crafts this item (primary outputs):

const stickRecipes = await registry.list({
  output: "minecraft:stick",
});

Leftover bucket (cake, etc.):

const bucketLeftover = await registry.list({
  leftover: "minecraft:bucket",
});

Station and output:

const tableSticks = await registry.list({
  station: "minecraft:crafting_table",
  output: "minecraft:stick",
});

No filters → every stored recipe (can be huge). Prefer a filter when you can.

Clone this wiki locally