1. Wiki
  2. /方块
  3. /minecraft:liquid_detection

minecraft:liquid_detection

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:liquid_detection。Get GodCraft

概览

minecraft:liquid_detection 是一个方块组件:写在自定义方块的 components 对象中。 决定水接触方块时会发生什么:可以把水留在方块里(含水)、让水流过,或者让方块破坏。每种液体只使用第一条规则。

字段

字段类型默认值说明
detection_rulesDetection Rule[]无按液体类型设置的规则,决定水能否留在方块中,以及水流入时会发生什么。

示例

写在 BP/blocks/<name>.json 的 components 对象中(值为默认值或占位值):

BP/blocks/<name>.json
{
  "minecraft:liquid_detection": {
    "detection_rules": []
  }
}

方块: 行为包

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