/attribute
Reads or changes entity attributes such as max health, movement speed, attack damage, and armor. You can set the base value directly or attach named modifiers (add/multiply) that stack on top of the base — the same mechanism gear and effects use.
What is /attribute used for?
What /attribute is for
Reads or changes an entity's attributes — max health, movement speed, attack damage, armor, and more — either by setting the base value or attaching named modifiers.
When to use /attribute
Make a custom boss with extra health, speed up or slow down a mob, give a player permanent reach or knockback resistance, or read a value to drive datapack logic.
Base vs modifiers
Setting the base changes the underlying value; modifiers (add/multiply) stack on top, the same way gear and effects work — so removing a modifier cleanly reverts the change.
Syntax
Parameters
- target
- entity selector
- Single entity to read/modify.
- attribute
- attribute ID
- e.g. minecraft:max_health, minecraft:movement_speed.
- operation
- literal
- get, base (get/set), or modifier (add/remove/value).
Command builder
Fill in the options below to generate a ready-to-paste /attribute command.
Single entity to read/modify.
e.g. minecraft:max_health, minecraft:movement_speed.
get, base (get/set), or modifier (add/remove/value).
Examples
Set your max health to 20 hearts.
Read your current base move speed.
Make the nearest zombie hit harder.
Common questions
How do I give a player more than 20 hearts?
Raise max health: /attribute @s minecraft:max_health base set 40 gives 20 hearts. Heal afterward to fill the new bar.
How do I make a mob faster?
Increase its movement speed, e.g. /attribute @e[type=zombie,limit=1] minecraft:movement_speed base set 0.3.
Permission level
/attribute requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.