Class endstone::AttributeInstance¶
ClassList > endstone > AttributeInstance
Represents a mutable instance of an attribute and its associated modifiers and values.
#include <endstone/attribute/attribute_instance.h>
Public Functions¶
| Type | Name |
|---|---|
| virtual void | addModifier (const AttributeModifier & modifier) = 0 Add a modifier to this instance. |
| virtual float | getBaseMaxValue () const = 0 Base max value of this instance before modifiers are applied. |
| virtual float | getBaseMinValue () const = 0 Base min value of this instance before modifiers are applied. |
| virtual float | getBaseValue () const = 0 Base value of this instance before modifiers are applied. |
| virtual float | getMaxValue () const = 0 Get the max value of this instance after all associated modifiers have been applied. |
| virtual float | getMinValue () const = 0 Get the min value of this instance after all associated modifiers have been applied. |
| virtual std::vector< AttributeModifier > | getModifiers () const = 0 Get all modifiers present on this instance. |
| virtual std::string | getType () const = 0 The attribute type pertaining to this instance. |
| virtual float | getValue () const = 0 Get the value of this instance after all associated modifiers have been applied. |
| virtual void | removeModifier (const AttributeModifier & modifier) = 0 Remove a modifier from this instance. |
| virtual void | setBaseMaxValue (float value) = 0 Set the base max value of this instance. |
| virtual void | setBaseMinValue (float value) = 0 Set the base min value of this instance. |
| virtual void | setBaseValue (float value) = 0 Set the base value of this instance. |
| virtual | ~AttributeInstance () = default |
Public Functions Documentation¶
function addModifier¶
Add a modifier to this instance.
Parameters:
modifierto add
function getBaseMaxValue¶
Base max value of this instance before modifiers are applied.
Returns:
base max value
function getBaseMinValue¶
Base min value of this instance before modifiers are applied.
Returns:
base max value
function getBaseValue¶
Base value of this instance before modifiers are applied.
Returns:
base value
function getMaxValue¶
Get the max value of this instance after all associated modifiers have been applied.
Returns:
the max attribute value
function getMinValue¶
Get the min value of this instance after all associated modifiers have been applied.
Returns:
the min attribute value
function getModifiers¶
Get all modifiers present on this instance.
Returns:
a copied collection of all modifiers
function getType¶
The attribute type pertaining to this instance.
Returns:
the attribute type
function getValue¶
Get the value of this instance after all associated modifiers have been applied.
Returns:
the total attribute value
function removeModifier¶
Remove a modifier from this instance.
Parameters:
modifierto remove
function setBaseMaxValue¶
Set the base max value of this instance.
Parameters:
valuenew base max value
function setBaseMinValue¶
Set the base min value of this instance.
Parameters:
valuenew base min value
function setBaseValue¶
Set the base value of this instance.
Parameters:
valuenew base value
function ~AttributeInstance¶
The documentation for this class was generated from the following file include/endstone/attribute/attribute_instance.h