Skip to content

@minecraft/server


@minecraft/server / BlockRedstoneProducerComponent

Class: BlockRedstoneProducerComponent ​

Defined in: @minecraft/server/index.d.ts:5454

Represents a block that can output a redstone signal.

Extends ​

Properties ​

block ​

readonly block: Block

Defined in: @minecraft/server/index.d.ts:4377

Remarks ​

Block instance that this component pertains to.

Inherited from ​

BlockComponent.block


isValid ​

readonly isValid: boolean

Defined in: @minecraft/server/index.d.ts:6234

Remarks ​

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.

Inherited from ​

BlockComponent.isValid


power ​

readonly power: number

Defined in: @minecraft/server/index.d.ts:5466

Remarks ​

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.

Throws ​

This property can throw when used.

InvalidBlockComponentError


typeId ​

readonly typeId: string

Defined in: @minecraft/server/index.d.ts:6240

Remarks ​

Identifier of the component.

Inherited from ​

BlockComponent.typeId


componentId ​

readonly static componentId: "minecraft:redstone_producer" = 'minecraft:redstone_producer'

Defined in: @minecraft/server/index.d.ts:5467

Methods ​

getConnectedFaces() ​

getConnectedFaces(): Direction[]

Defined in: @minecraft/server/index.d.ts:5479

Returns ​

Direction[]

Remarks ​

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.

Throws ​

This function can throw errors.

InvalidBlockComponentError


getStronglyPoweredFace() ​

getStronglyPoweredFace(): Direction | undefined

Defined in: @minecraft/server/index.d.ts:5493

Returns ​

Direction | undefined

Remarks ​

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.

Throws ​

This function can throw errors.

InvalidBlockComponentError