1. Wiki
  2. /Blocks
  3. /minecraft:liquid_detection

minecraft:liquid_detection

Don't want to write this by hand? GodCraft sets minecraft:liquid_detection for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
detection_rulesDetection Rule[]noneRules 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": []
  }
}

Blocks: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more