Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / RecipeDef

Class: RecipeDef โ€‹

Defined in: core/values/recipe.ts:40

A recipe, registered with Datapack.recipe. Rendered for the target version.

dp.recipe("ruby_block", RecipeDef.shaped( ["###", "###", "###"], { "#": Item.of("mypack:ruby") }, Item.of("mypack:ruby_block")));

Properties โ€‹

parts โ€‹

readonly parts: Record<string, RecipePart>

Defined in: core/values/recipe.ts:42

Methods โ€‹

cooking() โ€‹

static cooking(ing, res, opts?): RecipeDef

Defined in: core/values/recipe.ts:78

A cooking recipe: smelting (default), blasting, smoking or campfire_cooking. experience/cookingtime default to 0.1 / 200.

Parameters โ€‹

ing โ€‹

IngredientLike

res โ€‹

IngredientLike

opts? โ€‹
cookingtime? โ€‹

number

experience? โ€‹

number

type? โ€‹

"smelting" | "blasting" | "smoking" | "campfire_cooking"

Returns โ€‹

RecipeDef


of() โ€‹

static of(type, fields): RecipeDef

Defined in: core/values/recipe.ts:122

Escape hatch: a recipe by type id with already-built fields.

Parameters โ€‹

type โ€‹

string

fields โ€‹

Record<string, unknown>

Returns โ€‹

RecipeDef


shaped() โ€‹

static shaped(pattern, key, res, count?, category?): RecipeDef

Defined in: core/values/recipe.ts:45

minecraft:crafting_shaped - a grid pattern keyed by single-char ingredients.

Parameters โ€‹

pattern โ€‹

string[]

key โ€‹

Record<string, IngredientLike>

res โ€‹

IngredientLike

count? โ€‹

number = 1

category? โ€‹

"equipment" | "building" | "redstone" | "misc"

Returns โ€‹

RecipeDef


shapeless() โ€‹

static shapeless(ingredients, res, count?): RecipeDef

Defined in: core/values/recipe.ts:62

minecraft:crafting_shapeless - an unordered list of ingredients.

Parameters โ€‹

ingredients โ€‹

IngredientLike[]

res โ€‹

IngredientLike

count? โ€‹

number = 1

Returns โ€‹

RecipeDef


smithingTransform() โ€‹

static smithingTransform(template, base, addition, res): RecipeDef

Defined in: core/values/recipe.ts:106

minecraft:smithing_transform - template + base + addition -> result (1.20+ smithing).

Parameters โ€‹

template โ€‹

IngredientLike

base โ€‹

IngredientLike

addition โ€‹

IngredientLike

res โ€‹

IngredientLike

Returns โ€‹

RecipeDef


stonecutting() โ€‹

static stonecutting(ing, res, count?): RecipeDef

Defined in: core/values/recipe.ts:97

minecraft:stonecutting - one ingredient to count of a result.

Parameters โ€‹

ing โ€‹

IngredientLike

res โ€‹

IngredientLike

count? โ€‹

number = 1

Returns โ€‹

RecipeDef

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.