@minecraft/server
    Preparing search index...

    Class BlockRecipeProcessingComponentBeta

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

    Hierarchy (View Summary)

    Index

    Properties

    block: Block

    Block instance that this component pertains to.

    inputSlotCount: number

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

    This property can throw when used.

    InvalidBlockComponentError

    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.

    typeId: string

    Identifier of the component.

    componentId: "minecraft:recipe_processing" = 'minecraft:recipe_processing'

    Methods

    • Beta

      Parameters

      • slot: number

        The zero-based input slot index.

      Returns ItemStack | undefined

      The item stack in the input slot, or undefined if the slot is empty.

      Gets the item in the provided input slot.

      This function can throw errors.

      minecraftcommon.ArgumentOutOfBoundsError

      InvalidBlockComponentError

    • Beta

      Parameters

      • slot: number

        The zero-based input slot index.

      Returns boolean

      Whether the input slot is enabled.

      Gets whether an input slot is enabled for recipe processing.

      This function can throw errors.

      minecraftcommon.ArgumentOutOfBoundsError

      InvalidBlockComponentError

      minecraftcommon.UnsupportedFunctionalityError

    • Beta

      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

    • Beta

      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 throw errors.

      minecraftcommon.ArgumentOutOfBoundsError

      InvalidBlockComponentError

    • Beta

      Parameters

      • slot: number
      • enabled: boolean

      Returns void

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

      This function can throw errors.

      minecraftcommon.ArgumentOutOfBoundsError

      InvalidBlockComponentError

      minecraftcommon.UnsupportedFunctionalityError