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

    When present, this block has piston-like behavior. Contains additional properties for discovering block piston state.

    Hierarchy (View Summary)

    Index

    Properties

    block: Block

    Block instance that this component pertains to.

    isExpanded: boolean

    Whether the piston is fully expanded.

    This property can throw when used.

    isExpanding: boolean

    Whether the piston is in the process of expanding.

    This property can throw when used.

    isMoving: boolean

    Whether the piston is in the process of expanding or retracting.

    This property can throw when used.

    isRetracted: boolean

    Whether the piston is fully retracted.

    This property can throw when used.

    isRetracting: boolean

    Whether the piston is in the process of retracting.

    This property can throw when used.

    typeId: string

    Identifier of the component.

    componentId: "minecraft:piston" = 'minecraft:piston'

    Methods

    • Beta

      Returns Vector3[]

      Retrieves a set of blocks that this piston is connected with.

      This function can throw errors.

    • Beta

      Returns boolean

      Whether the component is valid.

      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.