minecraft:liquid_detection for you with a switch.Get GodCraftOverview
minecraft:liquid_detection is a block component: it goes in the components object of a custom block. Decides what happens when water touches the block: it can hold water inside (waterlog), let water flow through, or break. Only the first rule for each liquid is used.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
detection_rules | Detection Rule[] | none | Rules per liquid type, setting if water can sit in the block and what happens when it flows into it. |
Example
Inside the components object of BP/blocks/<name>.json (values are the defaults or placeholders):
BP/blocks/<name>.json
{
"minecraft:liquid_detection": {
"detection_rules": []
}
}