Attribute modifiers change the player's base stats when a race is selected. Each modifier targets one Minecraft attribute and applies a numeric change using one of three operations.

Modifier format

{
  "attribute": "minecraft:generic.max_health",
  "amount": 4,
  "operation": "add_value"
}
Field Type Required Description
attribute string yes Minecraft attribute resource location
amount number yes The magnitude of the change
operation string yes How amount is applied

Operations

Operation Behaviour
add_value Adds amount directly to the base attribute value
add_multiplied_base Multiplies the base value by amount and adds the result
add_multiplied_total Multiplies the total (after all additive modifiers) by amount and adds the result

Use add_value for flat changes (e.g. +4 health = +2 hearts). Use add_multiplied_base for percentage changes relative to the vanilla default (e.g. -0.1 speed = 10% slower).

Supported attributes

Attribute Vanilla default Unit
minecraft:generic.max_health 20 half-hearts
minecraft:generic.attack_damage 1 half-hearts per hit
minecraft:generic.movement_speed 0.1 internal units
minecraft:generic.armor 0 armor points
minecraft:generic.armor_toughness 0 toughness points
minecraft:generic.knockback_resistance 0 fraction (0–1)
minecraft:generic.scale 1.0 multiplier

For a full list of Minecraft attributes, see the Minecraft Wiki: Attribute.

Examples

Add 4 hearts of health:

{
  "attribute": "minecraft:generic.max_health",
  "amount": 8,
  "operation": "add_value"
}

Reduce movement speed by 20%:

{
  "attribute": "minecraft:generic.movement_speed",
  "amount": -0.2,
  "operation": "add_multiplied_base"
}

Add 2 armor points:

{
  "attribute": "minecraft:generic.armor",
  "amount": 2,
  "operation": "add_value"
}

Add 15% knockback resistance:

{
  "attribute": "minecraft:generic.knockback_resistance",
  "amount": 0.15,
  "operation": "add_value"
}

See also