Class EntityBreathableComponentBeta

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

Hierarchy

Constructors

Properties

breathesAir: boolean

Remarks

If true, this entity can breathe in air.

Throws

This property can throw when used.

breathesLava: boolean

Remarks

If true, this entity can breathe in lava.

Throws

This property can throw when used.

breathesSolids: boolean

Remarks

If true, this entity can breathe in solid blocks.

Throws

This property can throw when used.

breathesWater: boolean

Remarks

If true, this entity can breathe in water.

Throws

This property can throw when used.

generatesBubbles: boolean

Remarks

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

Throws

This property can throw when used.

inhaleTime: number

Remarks

Time in seconds to recover breath to maximum.

Throws

This property can throw when used.

suffocateTime: number

Remarks

Time in seconds between suffocation damage.

Throws

This property can throw when used.

totalSupply: number

Remarks

Time in seconds the entity can hold its breath.

Throws

This property can throw when used.

typeId: string
componentId: "minecraft:breathable" = 'minecraft:breathable'

Remarks

Identifier of this component. Should always be minecraft:breathable.

Methods

  • Returns BlockPermutation[]

    Remarks

    List of blocks this entity can breathe in, in addition to the separate properties for classes of blocks.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.

  • Returns BlockPermutation[]

    Remarks

    List of blocks this entity can't breathe in.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.

  • Parameters

    • value: number

      New air supply for the entity.

    Returns void

    Remarks

    Sets the current air supply of the entity.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.