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 TypeMethodDescriptiondouble
clampValue
(double value) Clamps a value to be within the bounds of this attribute type.double
Gets the default value of this attribute type before anyAttributeModifier
s 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 anyAttributeModifier
s 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.
-