跳转至

EntityBreathableComponent

文档版本:1.21.0.24

EntityBreathableComponent类,扩展自EntityComponent。script_api.minecraft/server.entitybreathablecomponent.description

常量

componentId
static read-only componentId = "minecraft:breathable";

属性

breathesAir
read-only breathesAir: boolean;
breathesLava
read-only breathesLava: boolean;
breathesSolids
read-only breathesSolids: boolean;
breathesWater
read-only breathesWater: boolean;
generatesBubbles
read-only generatesBubbles: boolean;
inhaleTime
read-only inhaleTime: float;
suffocateTime
read-only suffocateTime: int32;
totalSupply
read-only totalSupply: int32;

方法

getBreatheBlocks

script_api.minecraft/server.entitybreathablecomponent.getbreatheblocks.description

getBreatheBlocks(): BlockPermutation[]
getNonBreatheBlocks

script_api.minecraft/server.entitybreathablecomponent.getnonbreatheblocks.description

getNonBreatheBlocks(): BlockPermutation[]
setAirSupply

script_api.minecraft/server.entitybreathablecomponent.setairsupply.description

setAirSupply(value: int16): void