Skip to content

Class endstone::AttributeModifier

ClassList > endstone > AttributeModifier

Concrete implementation of an attribute modifier.

  • #include <endstone/attribute/attribute_modifier.h>

Public Types

Type Name
enum Operation
Operation to be applied.

Public Functions

Type Name
AttributeModifier (AttributeModifierId id, float amount, Operation operation)
Construct a new attribute modifier.
float getAmount () const
Get the amount by which this modifier will apply its operation.
AttributeModifierId getId () const
Get the id of this modifier.
Operation getOperation () const
Get the operation this modifier will apply.

Public Types Documentation

enum Operation

Operation to be applied.

enum endstone::AttributeModifier::Operation {
    Add,
    MultiplyBase,
    Multiply,
    Cap
};


Public Functions Documentation

function AttributeModifier

Construct a new attribute modifier.

inline endstone::AttributeModifier::AttributeModifier (
    AttributeModifierId id,
    float amount,
    Operation operation
) 

Parameters:

  • id the id of the modifier
  • amount the amount by which the modifier applies its operation
  • operation the operation to apply

function getAmount

Get the amount by which this modifier will apply its operation.

inline float endstone::AttributeModifier::getAmount () const

Returns:

modification amount


function getId

Get the id of this modifier.

inline AttributeModifierId endstone::AttributeModifier::getId () const

Returns:

id


function getOperation

Get the operation this modifier will apply.

inline Operation endstone::AttributeModifier::getOperation () const

Returns:

operation



The documentation for this class was generated from the following file include/endstone/attribute/attribute_modifier.h