1. Wiki
  2. /实体
  3. /minecraft:breathable

minecraft:breathable

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

概览

minecraft:breathable 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 决定实体能在哪里呼吸,以及能憋气多久才开始受到伤害。可用于鱼类、岩浆生物或者完全不需要空气的生物。

字段

字段类型默认值说明
breathe_blocksList无实体可以在其中呼吸的额外方块。
breathes_airBoolean"true"实体能否在空气中呼吸。
breathes_lavaBoolean"true"实体能否在岩浆中呼吸。
breathes_solidsBoolean"false"实体卡在固体方块里时能否呼吸。
breathes_waterBoolean"false"实体能否在水下呼吸。
generates_bubblesBoolean"true"实体在水中时周围显示气泡粒子。
inhale_timeDecimal"0"把氧气条完全恢复所需的秒数。
non_breathe_blocksList无实体无法在其中呼吸的额外方块。
suffocate_timeInteger"-20"氧气耗尽后,每次受到伤害之间间隔的秒数。
total_supplyInteger"15"实体能憋气多少秒。

示例

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

BP/entities/<name>.json
{
  "minecraft:breathable": {
    "breathe_blocks": {},
    "breathes_air": "true",
    "breathes_lava": "true",
    "breathes_solids": "false",
    "breathes_water": "false",
    "generates_bubbles": "true",
    "inhale_time": "0",
    "non_breathe_blocks": {}
  }
}

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