/attribute
Change stats like speed, health, or attack damage on entities.
Overview
What is the /attribute command?
The /attribute command reads and changes an entity's attributes โ base stats like max health, movement speed, attack damage, armor and knockback resistance. You can set the base value or apply temporary, stackable modifiers.
It's how you make a super-fast player, a tanky boss mob, or fine-tune balance in custom fights and minigames.
When to use it: Use /attribute to change core stats like max health, speed or attack damage on players and mobs.
At a glance
Syntax
/attribute <target> <attribute> base set <value>See it
What it does
Anatomy
Every part, explained
- 1
CommandRequired/attributeReads or changes an attribute.
- 2
TargetRequired<target>A single entity to modify.
- 3
AttributeRequired<attribute>Which stat, like generic.movement_speed.
- 4
ValueRequiredbase set <value>Set the base value to a number.
Your turn
Try it yourself
Copy & paste
Examples
/attribute @s minecraft:generic.movement_speed base set 0.2Set your walking speed.
/attribute @s minecraft:generic.max_health base set 40Double your max health.
/attribute @s minecraft:generic.attack_damage base getRead your attack damage.
Avoid these
Common mistakes
/attribute @s movement_speed base set 0.2/attribute @s minecraft:generic.movement_speed base set 0.2Use the full attribute ID with namespace.
/attribute @a generic.max_health base set 40/attribute @s minecraft:generic.max_health base set 40Attribute targets a single entity, not @a.
Good to know
Frequently asked questions
- How do you change a mob's health with a command?
- Run /attribute <target> minecraft:generic.max_health base set <value>, then heal the entity to apply the new maximum.
- How do you make a player move faster?
- Use /attribute @s minecraft:generic.movement_speed base set <value> โ small numbers go a long way, so increase gently.
- What's the difference between base and a modifier?
- The base is the core value; modifiers add temporary, named, stackable changes on top and can be removed later without losing the base.
Keep going