Interface AttributeType
- All Superinterfaces:
DefaultedRegistryValue
- All Known Subinterfaces:
RangedAttributeType
Represents an attribute type that can apply effects or modify traits related to an entity.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleclampValue(double value) Clamps a value to be within the bounds of this attribute type.doubleGets the default value of this attribute type before anyAttributeModifiers are applied.Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Method Details
-
defaultValue
double defaultValue()Gets the default value of this attribute type before anyAttributeModifiers are applied.- Returns:
- The default value of this attribute type.
-
clampValue
double clampValue(double value) Clamps a value to be within the bounds of this attribute type.- Parameters:
value- The value to clamp- Returns:
- A value within this attribute type's bounds.
-