Class: BlockRedstoneProducerComponent
block componentBeta
表示可以输出红石信号的方块。
Represents a block that can output a redstone signal.
Extends
Properties
block
readonlyblock:Block
Beta
Remarks
此组件所属的方块。
Block instance that this component pertains to.
Inherited from
isValid
readonlyisValid:boolean
Beta
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
Beta
Remarks
获取此方块向电路系统输出的红石信号强度。如果方块不再有效或不具有 minecraft:redstone_producer 组件,则返回错误。
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
Beta
Remarks
组件的标识符。
Identifier of the component.
Inherited from
componentId
readonlystaticcomponentId:"minecraft:redstone_producer"='minecraft:redstone_producer'
Beta
Methods
getConnectedFaces()
getConnectedFaces():
Direction[]
Beta
Returns
Remarks
获取此方块可以连接到电路并输出红石信号强度的面。如果方块不再有效或不具有 minecraft:redstone_producer 组件,则返回错误。
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
Beta
Returns
Direction | undefined
Remarks
获取对方块进行强充能的方块面。如果 minecraft:redstone_producer 方块组件未定义 strongly_powered_face,则此方法返回 undefined。如果方块不再有效或不具有 minecraft:redstone_producer 组件,则返回错误。
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.
