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

twine / guardedRecipe

Function: guardedRecipe() โ€‹

guardedRecipe(dp, name, inputs, output, count?): RecipeRef

Defined in: twine/src/item/guarded-recipe.ts:13

Registers name, a shapeless recipe making count of output from inputs, and the events in dp that undo a craft whose grid didn't hold every one of inputs. One per group, since the events' names are fixed.

guardedRecipe(dp, "refined_scrap", [Scrap, Scrap, Scrap, Scrap], itemOf(RefinedScrap).item)

Parameters โ€‹

dp โ€‹

Datapack

name โ€‹

string

inputs โ€‹

ItemLike[]

output โ€‹

ItemLike

count? โ€‹

number = 1

Returns โ€‹

RecipeRef

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