Minecraft /attribute command

Java EditionSince Java 1.16 (20w17a)

Quick answer: Reads and modifies entity attributes like max health, speed, attack damage and scale. Syntax: attribute <target> <attribute> <get|base get|base set|base reset|modifier add|modifier remove|modifier value get> ...

/attribute exposes the numeric stats behind every entity: max_health, movement_speed, attack_damage, scale and more. You can read values, overwrite the base value, or stack modifiers (the same system potion effects and equipment use). It is how data packs and adventure maps make custom bosses with 200 HP or double speed.

Syntax

EditionSyntax
Javaattribute <target> <attribute> <get|base get|base set|base reset|modifier add|modifier remove|modifier value get> ...
Bedrock(Java Edition only)

Targets / arguments: One entity at a time (players, mobs, some others). Requires: Cheats enabled / operator level 2.

Examples

/attribute @s minecraft:max_health base set 40

Give yourself 20 hearts permanently

/attribute @e[type=zombie,limit=1] minecraft:movement_speed base set 0.4

Make a zombie twice as fast

/attribute @s minecraft:scale base set 0.5

Shrink yourself to half size (Java 1.20.5+)

Tips

Related commands

/effect/damage/summon