Script API - v26.60
    Preparing search index...

    Class RecipeCraftingContextBeta

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

    export class RecipeCraftingContext {
    private constructor();
    readonly inputSlotCount: number;
    readonly isValid: boolean;
    readonly validRecipes: string[];
    getInputItem(slot: number): ItemStack | undefined;
    getOutputItem(): ItemStack | undefined;
    setInputItem(slot: number, item?: ItemStack): void;
    setSelectedRecipe(recipeId: string): void;
    }
    Index
    inputSlotCount: number

    The amount of addressable input slots for getInputItem and setInputItem.

    This property can throw when used.

    minecraftcommon.EngineError

    This property can't be read in early-execution mode.

    isValid: boolean

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

    This property can't be read in early-execution mode.

    validRecipes: string[]

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

    This property can throw when used.

    minecraftcommon.EngineError

    This property can't be read in early-execution mode.