跳转至

EntityAttributeComponent

文档版本:1.21.0.24

EntityAttributeComponent类,扩展自EntityComponent。script_api.minecraft/server.entityattributecomponent.description

属性

currentValue
read-only currentValue: float;
defaultValue
read-only defaultValue: float;
effectiveMax
read-only effectiveMax: float;
effectiveMin
read-only effectiveMin: float;

方法

resetToDefaultValue

script_api.minecraft/server.entityattributecomponent.resettodefaultvalue.description

resetToDefaultValue(): void
resetToMaxValue

script_api.minecraft/server.entityattributecomponent.resettomaxvalue.description

resetToMaxValue(): void
resetToMinValue

script_api.minecraft/server.entityattributecomponent.resettominvalue.description

resetToMinValue(): void
setCurrentValue

script_api.minecraft/server.entityattributecomponent.setcurrentvalue.description

setCurrentValue(value: float): boolean