Skip to content

@minecraft/server


@minecraft/server / EntityBreathableComponent

Class: EntityBreathableComponent ​

Defined in: @minecraft/server/index.d.ts:9821

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

Extends ​

Properties ​

breathesAir ​

readonly breathesAir: boolean

Defined in: @minecraft/server/index.d.ts:9829

Remarks ​

If true, this entity can breathe in air.

Throws ​

This property can throw when used.


breathesLava ​

readonly breathesLava: boolean

Defined in: @minecraft/server/index.d.ts:9836

Remarks ​

If true, this entity can breathe in lava.

Throws ​

This property can throw when used.


breathesSolids ​

readonly breathesSolids: boolean

Defined in: @minecraft/server/index.d.ts:9843

Remarks ​

If true, this entity can breathe in solid blocks.

Throws ​

This property can throw when used.


breathesWater ​

readonly breathesWater: boolean

Defined in: @minecraft/server/index.d.ts:9850

Remarks ​

If true, this entity can breathe in water.

Throws ​

This property can throw when used.


entity ​

readonly entity: Entity

Defined in: @minecraft/server/index.d.ts:9981

Remarks ​

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

Throws ​

This property can throw when used.

InvalidEntityError

Inherited from ​

EntityComponent.entity


generatesBubbles ​

readonly generatesBubbles: boolean

Defined in: @minecraft/server/index.d.ts:9858

Remarks ​

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

Throws ​

This property can throw when used.


inhaleTime ​

readonly inhaleTime: number

Defined in: @minecraft/server/index.d.ts:9865

Remarks ​

Time in seconds to recover breath to maximum.

Throws ​

This property can throw when used.


isValid ​

readonly isValid: boolean

Defined in: @minecraft/server/index.d.ts:6234

Remarks ​

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.

Inherited from ​

EntityComponent.isValid


suffocateTime ​

readonly suffocateTime: number

Defined in: @minecraft/server/index.d.ts:9872

Remarks ​

Time in seconds between suffocation damage.

Throws ​

This property can throw when used.


totalSupply ​

readonly totalSupply: number

Defined in: @minecraft/server/index.d.ts:9879

Remarks ​

Time in seconds the entity can hold its breath.

Throws ​

This property can throw when used.


typeId ​

readonly typeId: string

Defined in: @minecraft/server/index.d.ts:6240

Remarks ​

Identifier of the component.

Inherited from ​

EntityComponent.typeId


componentId ​

readonly static componentId: "minecraft:breathable" = 'minecraft:breathable'

Defined in: @minecraft/server/index.d.ts:9880

Methods ​

getBreatheBlocks() ​

getBreatheBlocks(): BlockPermutation[]

Defined in: @minecraft/server/index.d.ts:9888

Returns ​

BlockPermutation[]

Remarks ​

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

Throws ​

This function can throw errors.


getNonBreatheBlocks() ​

getNonBreatheBlocks(): BlockPermutation[]

Defined in: @minecraft/server/index.d.ts:9895

Returns ​

BlockPermutation[]

Remarks ​

List of blocks this entity can't breathe in.

Throws ​

This function can throw errors.