跳转至

Breathable

文档版本:1.21.0.24

Defines what blocks this entity can breathe in and gives them the ability to suffocate.

架构

breathable:
{
  integer "total_supply" : opt
  integer "suffocate_time" : opt
  number "inhale_time" : opt
  boolean "breathes_air" : opt
  boolean "breathes_water" : opt
  boolean "breathes_lava" : opt
  boolean "breathes_solids" : opt
  boolean "generates_bubbles" : opt
  array "breathe_blocks" : opt
  {
    reference "<any array element>"
  }
  array "non_breathe_blocks" : opt
  {
    reference "<any array element>"
  }
}
total_supplyinteger
Time in seconds the entity can hold its breath.
suffocate_timeinteger
Time in seconds between suffocation damage.
inhale_timenumber
Time in seconds to recover breath to maximum.
breathes_airboolean
If true, this entity can breathe in air.
breathes_waterboolean
If true, this entity can breathe in water.
breathes_lavaboolean
If true, this entity can breathe in lava.
breathes_solidsboolean
If true, this entity can breathe in solid blocks.
generates_bubblesboolean
If true, this entity will have visible bubbles while in water.
breathe_blocksarray
List of blocks this entity can breathe in, in addition to the above.
breathe_blocks
<any array element>reference
identifier:
string
reference:
{
  identifier "name"
  object "states" : opt
  {
    ['boolean', 'integer', 'string'] "\w*:?\w+" : opt
  }
  0 "tags"
}
nameidentifier
statesobject
states
\w*:?\w+['boolean', 'integer', 'string']
The key of property is the name of the block state/property, the value must be the same as the block properties accepted values.
tags0
A condition using Molang queries that results to true/false that can be used to query for blocks with certain tags.
0:
string
non_breathe_blocksarray
List of blocks this entity can't breathe in, in addition to the above.
non_breathe_blocks
<any array element>reference