@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 ​
readonlybreathesAir: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 ​
readonlybreathesLava: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 ​
readonlybreathesSolids: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 ​
readonlybreathesWater: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 ​
readonlyentity: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.
Inherited from ​
generatesBubbles ​
readonlygeneratesBubbles: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 ​
readonlyinhaleTime: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 ​
readonlyisValid: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 ​
suffocateTime ​
readonlysuffocateTime:number
Defined in: @minecraft/server/index.d.ts:9872
Remarks ​
Time in seconds between suffocation damage.
Throws ​
This property can throw when used.
totalSupply ​
readonlytotalSupply: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 ​
readonlytypeId:string
Defined in: @minecraft/server/index.d.ts:6240
Remarks ​
Identifier of the component.
Inherited from ​
componentId ​
readonlystaticcomponentId:"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 ​
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 ​
Remarks ​
List of blocks this entity can't breathe in.
Throws ​
This function can throw errors.