@minecraft
    正在准备搜索索引...

    类 EntityBreathableComponent

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

    层级 (查看层级一览)

    索引

    属性

    airSupply: number

    The current air supply of the entity.

    Will throw an error if the air supply is out of bounds [suffocationTime, maxAirSupply].

    breathesAir: boolean

    If true, this entity can breathe in air.

    This property can throw when used.

    breathesLava: boolean

    If true, this entity can breathe in lava.

    This property can throw when used.

    breathesSolids: boolean

    If true, this entity can breathe in solid blocks.

    This property can throw when used.

    breathesWater: boolean

    If true, this entity can breathe in water.

    This property can throw when used.

    canBreathe: boolean

    If true, the entity is able to breathe.

    This property can throw when used.

    entity: Entity

    The entity that owns this component. The entity will be undefined if it has been removed.

    This property can throw when used.

    InvalidEntityError

    generatesBubbles: boolean

    If true, this entity will have visible bubbles while in water.

    This property can throw when used.

    inhaleTime: number

    Time in seconds to recover breath to maximum.

    This property can throw when used.

    isValid: boolean

    Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.

    suffocateTime: number

    Time in seconds between suffocation damage.

    This property can throw when used.

    totalSupply: number

    Time in seconds the entity can hold its breath.

    This property can throw when used.

    typeId: string

    Identifier of the component.

    componentId: "minecraft:breathable" = 'minecraft:breathable'

    方法