-
Notifications
You must be signed in to change notification settings - Fork 0
Asking the Catalog
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.
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.
Same idea as vanilla JSON recipes:
await registry.match({
station: "minecraft:crafting_table",
pattern: ["A", "A"],
key: { A: "minecraft:oak_planks" },
});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,
],
});| 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.
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.