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

    Class BlockRecipeProcessingComponentBeta

    Represents a block component that provides access to recipe processing inputs and output.

    export class BlockRecipeProcessingComponent extends BlockComponent {
    private constructor();
    readonly inputSlotCount: number;
    static readonly componentId = 'minecraft:recipe_processing';
    getInputItem(slot: number): ItemStack | undefined;
    getInputSlotEnabled(slot: number): boolean;
    getOutputItem(): ItemStack | undefined;
    setInputItem(slot: number, item?: ItemStack): void;
    setInputSlotEnabled(slot: number, enabled: boolean): void;
    }

    Hierarchy (View Summary)

    Index
    block: Block

    Block instance that this component pertains to.

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

    inputSlotCount: number

    The number of addressable input slots for getInputItem, setInputItem, setInputSlotEnabled, and getInputSlotEnabled.

    This property can throw when used.

    InvalidBlockComponentError

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

    isValid: boolean

    Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.

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

    typeId: string

    Identifier of the component.

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

    componentId: "minecraft:recipe_processing" = 'minecraft:recipe_processing'
    • Returns ItemStack | undefined

      The output item stack, or undefined if the current inputs do not produce an item.

      Gets the item produced by the current recipe processing inputs.

      This function can throw errors.

      InvalidBlockComponentError

      This function can't be called in early-execution mode.

    • Parameters

      • slot: number

        The zero-based input slot index.

      • Optionalitem: ItemStack

        The item stack to place in the slot, or undefined to clear the slot.

      Returns void

      Sets or clears an item in an input slot.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.