概览
minecraft:liquid_detection 是一个方块组件:写在自定义方块的 components 对象中。 决定水接触方块时会发生什么:可以把水留在方块里(含水)、让水流过,或者让方块破坏。每种液体只使用第一条规则。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
detection_rules | Detection Rule[] | 无 | 按液体类型设置的规则,决定水能否留在方块中,以及水流入时会发生什么。 |
示例
写在 BP/blocks/<name>.json 的 components 对象中(值为默认值或占位值):
BP/blocks/<name>.json
{
"minecraft:liquid_detection": {
"detection_rules": []
}
}