@minecraft/server
    Preparing search index...

    Class BlockRecipeCraftingComponentBeta

    Represents a block component that provides access to recipe crafting.

    Hierarchy (View Summary)

    Index

    Properties

    block: Block

    Block instance that this component pertains to.

    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.

    players: Player[]

    Returns an array of all players currently interacting with this block.

    typeId: string

    Identifier of the component.

    componentId: "minecraft:recipe_crafting" = 'minecraft:recipe_crafting'

    Methods

    • Beta

      Parameters

      • player: Player

        The player for whom to retrieve the crafting context.

      Returns RecipeCraftingContext | undefined

      The current recipe crafting context for the player, or undefined if the player isn't crafting.

      Gets the recipe crafting context for a player interacting with this block.

      This function can throw errors.

      minecraftcommon.EngineError

      InvalidEntityError