@minecraft
    Preparing search index...

    Class RecipeCraftingContextBeta

    Provides access to the slots and recipe of a players active crafting UI ie. stonecutter.

    Index

    Properties

    inputSlotCount: number

    The amount of addressable input slots for getInputItem and setInputItem.

    This property can throw when used.

    EngineError

    isValid: boolean

    Whether this recipe crafting context is valid. Invalidates when the player closes the crafting UI or leaves.

    validRecipes: string[]

    The identifiers of the recipes that are valid for the current input items.

    This property can throw when used.

    EngineError

    Methods

    • World mutation

      Parameters

      • recipeId: string

        The identifier of a valid recipe to select.

      Returns void

      Selects a recipe for the current crafting operation.

      This function can throw errors.

      EngineError

      InvalidRecipeError