Modifier Operation

Data Type.

A String used to specify an operation used by Attribute Modifiers and Attributed Attribute Modifiers.

Values:

Value Description
addition Adds (or subtracts) the modifier value to the base: NewValue = BaseValue + ModifierValue.
multiply_base Adds (or subtracts) a portion of the base value: NewValue = CurrentValue + (BaseValue * ModifierValue)
multiply_total Multiplies the total value by this value: NewTotalValue = TotalValue * (1 + ModifierValue)

Examples:

{
    "operation": "multiply_total"
}

Will multiply the total value.

"modifier": {
    "attribute": "reach-entity-attributes:reach",
    "operation": "addition",
    "value": -2
}

A modifier operation used inside an Attributed Attribute Modifier, which subtracts 2 blocks from the player's block reach.