Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/attribute

From SAS Gaming Wiki
Revision as of 15:43, 9 April 2026 by SyncBot (talk | contribs) (Remove broken links to missing pages)

Template:Exclusive Template:Infobox command

Used to change or read Minecraft:attributes.

Syntax

attribute <target> <attribute> get [<scale>]
Returns the total value of the specified attribute.
attribute <target> <attribute> base get [<scale>]
Returns the base value of the specified attribute.
attribute <target> <attribute> base set <value>
Overwrites the base value of the specified attribute with the given value.
attribute <target> <attribute> base reset
Resets the base value of the specified attribute to its default value.
attribute <target> <attribute> modifier add <id> <value> (add_value|add_multiplied_base|add_multiplied_total)
Adds an attribute modifier with the specified properties if no modifier with the same ID already existed.
attribute <target> <attribute> modifier remove <id>
Removes the attribute modifier with the specified ID.
attribute <target> <attribute> modifier value get <id> [<scale>]
Returns the value of the modifier with the specified ID.

Arguments

Template:Argument

The entity that the Minecraft:attribute is applied to. Only players, armor stands, and Minecraft:mobs have attributes.
Template:Arg desc

Template:Argument

Specifies the attribute.
Template:Arg desc

Template:Argument

The number the value is multiplied with before being stored with Template:Cmd command.
Template:Arg desc

Template:Argument

Specifies the id of a modifier.
Template:Arg desc

Template:Argument

Specifies the value to use.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Examples

  • To set the minimum armor value of the current entity to 5:
    /attribute @s minecraft:armor base set 5
    To set the minimum scale value of the current entity to .5:
    /attribute @s minecraft:armor base set .5

History

Template:HistoryTable

Navigation

Template:Navbox commands

de:Befehl/attribute es:Comandos/attribute ja:コマンド/attribute pt:Comandos/attribute zh:命令/attribute