@minecraft
    正在准备搜索索引...

    类 RecipeCraftingContext实验性

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

    索引

    属性

    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

    方法

    • 世界修改

      参数

      • recipeId: string

        The identifier of a valid recipe to select.

      返回 void

      Selects a recipe for the current crafting operation.

      This function can throw errors.

      EngineError

      InvalidRecipeError