概览
minecraft:redstone_producer 是一个方块组件:写在自定义方块的 components 对象中。 让方块发出红石信号,就像红石块或打开的拉杆一样。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
power | integer | 无 | 信号强度,从 0(关闭)到 15(最强)。范围:0 到 15 |
strongly_powered_face | Facing | 无 | 被强充能的那一面,与它接触的方块也能为自己的相邻方块供能。 |
connected_faces | Facing[] | ["down","up","north","south","west","east"] | 发出信号的面。省略时所有面都会发出信号。 |
transform_relative | boolean | true | 为 true 时,这些面会跟随方块 minecraft:transformation 的旋转一起转动。 |
示例
写在 BP/blocks/<name>.json 的 components 对象中(值为默认值或占位值):
BP/blocks/<name>.json
{
"minecraft:redstone_producer": {
"power": 0,
"strongly_powered_face": {},
"connected_faces": [
"down",
"up",
"north",
"south",
"west",
"east"
],
"transform_relative": true
}
}