Script API - v1.21.130.24
    Preparing search index...

    Class BlockRedstoneProducerComponentRc

    Represents a block that can output a redstone signal.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    block: Block

    Block instance that this component pertains to.

    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.

    power: number

    Gets the power that this block outputs to circuit system. Returns error if block is no longer valid or if block doesn't have a 'minecraft:redstone_producer' component.

    This property can throw when used.

    InvalidBlockComponentError

    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:redstone_producer" = 'minecraft:redstone_producer'

    Methods

    • Returns Direction[]

      Gets the faces of this block that can connect to the circuit and output power. Returns error if block is no longer valid or if block doesn't have a 'minecraft:redstone_producer' component.

      This function can throw errors.

      InvalidBlockComponentError

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

    • Returns Direction

      Gets the block face that strongly powers the block touching it. If the 'minecraft:redstone_producer' block component hasn't defined a 'strongly_powered_face' then this method returns 'undefined'. Returns error if block is no longer valid or if block doesn't have a 'minecraft:redstone_producer' component.

      This function can throw errors.

      InvalidBlockComponentError

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