Data component predicate/attribute modifier

Minecraft Wiki article. Categories: Data_component_format_subpages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Data component predicate/attribute modifier on the Minecraft Wiki. Mirrored from revision 3556473. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

    • [String][NBT List / JSON Array] attribute: (Optional) Any number of attribute(s) (an [String] ID, or a [String] tag with #, or an [NBT List / JSON Array] array containing [String] IDs)
    • [NBT List / JSON Array] id: (Optional) Checks the namespaced ID of the attribute modifier.
    • [Double] amount: (Optional) Checks the amount from the attribute modifier. Matches an exact [Int]value, or checks if the value is between a range.
    • [NBT Compound / JSON Object] amount: (Optional) Another format.
      • [Double] max: (Optional) The maximum value.
      • [Double] min: (Optional) The minimum value.
    • [String] operation: (Optional) Checks the operation of the attribute modifier. Must be one of add_value, add_multiplied_base, and add_multiplied_total.
    • [String] slot: (Optional) Checks the slot of the attribute modifier. Must be one of any, mainhand, offhand, hand, head, chest, legs, feet, armor, and body.

Sources