-
Notifications
You must be signed in to change notification settings - Fork 0
Registering Recipes
xXDMOGXx edited this page Aug 21, 2026
·
1 revision
Vanilla recipes are already on the host. Register only your recipes.
Minimum fields:
-
id— unique string (mymod:crush_cobble) -
stations— block ids this recipe runs on -
inputs— bag (and/or shaped fields below) -
outputs— products
Optional: type, pattern, key, leftover, priority, duration, energy, extra, …
Example shapeless:
await registry.register([
{
id: "mymod:crush_cobble",
stations: ["mymod:crusher"],
inputs: ["minecraft:cobblestone"],
outputs: ["minecraft:gravel"],
},
]);const source = "mymod"; // usually your pack namespace
const rev = 1000; // bump when your recipe set changes
const same = await registry.sync(source, rev);
if (same === true) {
// Host already has this set
} else if (same === false) {
await registry.register(recipes, { source, rev });
} else {
// Timed out
}-
sourcemust be a valid id-style string (same rules as pack namespaces). - After
ready, callsyncorregisterwithin about a minute or the host may drop that source’s persisted data.
await registry.unregister(["mymod:crush_cobble"]);