The EntityAttributeComponent class in @minecraft/server.
Class in @minecraft/server
Extends EntityComponent
Extended by EntityExhaustionComponent, EntityHungerComponent, EntityLavaMovementComponent, EntityMovementComponent, EntitySaturationComponent, EntityUnderwaterMovementComponent
import { EntityAttributeComponent } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”currentValue
Section titled “currentValue”read-only
readonly currentValue: number;defaultValue
Section titled “defaultValue”read-only
readonly defaultValue: number;effectiveMax
Section titled “effectiveMax”read-only
readonly effectiveMax: number;effectiveMin
Section titled “effectiveMin”read-only
readonly effectiveMin: number;Methods
Section titled “Methods”resetToDefaultValue
Section titled “resetToDefaultValue”resetToDefaultValue(): void;resetToMaxValue
Section titled “resetToMaxValue”resetToMaxValue(): void;resetToMinValue
Section titled “resetToMinValue”resetToMinValue(): void;setCurrentValue
Section titled “setCurrentValue”setCurrentValue(value: number): boolean;Parameters
valuenumber
Returns
boolean