@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 ​
readonlyblock:Block
Defined in: @minecraft/server/index.d.ts:4377
Remarks ​
Block instance that this component pertains to.
Inherited from ​
isValid ​
readonlyisValid: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 ​
power ​
readonlypower: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.
typeId ​
readonlytypeId:string
Defined in: @minecraft/server/index.d.ts:6240
Remarks ​
Identifier of the component.
Inherited from ​
componentId ​
readonlystaticcomponentId:"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 ​
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.
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.