@minecraft
    正在准备搜索索引...

    类 BlockPistonComponent

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

    层级 (查看层级一览)

    索引

    属性

    block: Block

    Block instance that this component pertains to.

    isMoving: boolean

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

    This property can throw when used.

    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.

    The current state of the piston.

    This property can throw when used.

    typeId: string

    Identifier of the component.

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

    方法

    • 返回 Block[]

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

      This function can throw errors.

    • 返回 Vector3[]

      Retrieves a set of block locations that this piston is connected with.

      This function can throw errors.