Interface AttributeType
-
- All Superinterfaces:
DefaultedRegistryValue
- All Known Subinterfaces:
RangedAttributeType
@CatalogedBy(AttributeTypes.class) public interface AttributeType extends DefaultedRegistryValue
Represents an attribute type that can apply effects or modify traits related to an entity.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
clampValue(double value)
Clamps a value to be within the bounds of this attribute type.double
defaultValue()
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 Detail
-
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.
-
-