Table of Contents

minecraft:attribute_modifiers

The minecraft:attribute_modifiers item component modifies attributes on the entity containing the item. Its value is a list of attribute modifiers. Its values may be overridden for a specific item stack by using the minecraft:attribute_modifiers data component.

Example

[
  {
    "type": "minecraft:generic.attack_damage",
    "slot": "mainhand",
    "uuid": [
      -885041709,
      1683771192,
      -1533567981,
      -1556236849
    ],
    "name": "Tool modifier",
    "amount": 3.0,
    "operation": "add_value"
  },
  {
    "type": "minecraft:generic.attack_speed",
    "slot": "mainhand",
    "uuid": [
      -98353636,
      1098926181,
      -1340359474,
      -1752847197
    ],
    "name": "Tool modifier",
    "amount": -2.799999952316284,
    "operation": "add_value"
  }
]

Attribute Modifier

A specific attribute to apply to the entity containing the item.

Fields

Name Description Type Default Value
type The attribute to modify. An attribute
slot The slot to apply the attribute to. An optional attribute modifier slot any
uuid A unique identifier for the attribute. A list of four integers, representing a UUID
name A name describing the attribute modifier. A string
amount The amount to apply to the attribute. A double
operation Determines how to apply the amount. An attribute operation

Example

{
  "type": "minecraft:generic.attack_damage",
  "slot": "mainhand",
  "uuid": [
    -885041709,
    1683771192,
    -1533567981,
    -1556236849
  ],
  "name": "Tool modifier",
  "amount": 3.0,
  "operation": "add_value"
}

Attribute Modifier Slot

The slot to apply the attribute modifier to. Its value, a string, may be one of the following: