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
| Edition | Syntax |
|---|---|
| Java | attribute <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 40Give yourself 20 hearts permanently
/attribute @e[type=zombie,limit=1] minecraft:movement_speed base set 0.4Make a zombie twice as fast
/attribute @s minecraft:scale base set 0.5Shrink yourself to half size (Java 1.20.5+)
Tips
- base set persists; use base reset to restore the vanilla default.
- Modifiers stack with equipment - check current totals with get.
- scale (1.20.5+) changes entity size, hitbox and reach together.