Updated:
Make a player twice as big
| Version | Command |
|---|---|
| Java 1.21.2 and later | /attribute @s minecraft:scale base set 2 |
| Java 1.20.5–1.21.1 | /attribute @s minecraft:generic.scale base set 2 |
1 is normal size, 2 is double and 0.5 is half. The allowed range is 0.0625 to 16. Java 1.21.2 removed the generic. prefix from attribute names, so match the name to your version.
Common attributes and player defaults
| Changes | Name (1.21.2+) | Default |
|---|---|---|
| Size | minecraft:scale | 1 |
| Walking speed | minecraft:movement_speed | 0.1 |
| Jump strength | minecraft:jump_strength | 0.42 |
| Step height | minecraft:step_height | 0.6 |
| Gravity | minecraft:gravity | 0.08 |
| Safe fall distance | minecraft:safe_fall_distance | 3 |
| Max health | minecraft:max_health | 20 |
On 1.20.5–1.21.1, add generic. after minecraft: (for example minecraft:generic.jump_strength). Scale, jump strength, step height, gravity and safe fall distance were added in 1.20.5 and do not exist in older versions.
Examples
/attribute @s minecraft:jump_strength base set 1
/attribute @s minecraft:movement_speed base set 0.2
/attribute @s minecraft:step_height base set 1
/attribute @s minecraft:gravity base set 0.02
From top to bottom: jump much higher, walk twice as fast, walk up full blocks without jumping, and fall slowly like on the moon (1.21.2+ names).
Resize a mob
/attribute @e[type=minecraft:zombie,limit=1,sort=nearest] minecraft:scale base set 3
The nearest zombie becomes three times bigger, and its hitbox grows too.
Temporary boosts with modifiers (Java 1.21+)
# 1.21.2+ name; 1.21–1.21.1 use minecraft:generic.movement_speed
/attribute @s minecraft:movement_speed modifier add mypack:boost 0.5 add_multiplied_base
/attribute @s minecraft:movement_speed modifier remove mypack:boost
A modifier is added on top of the base value and can be removed by its ID, so it will not overwrite changes made by other commands. add_multiplied_base with 0.5 means +50% speed. The other operations are add_value (adds a fixed number) and add_multiplied_total. In 1.20.5–1.21.1 modifiers used a UUID and name instead of an ID.
Give a boss more health
/attribute @e[type=minecraft:zombie,limit=1,sort=nearest] minecraft:max_health base set 100
/data merge entity @e[type=minecraft:zombie,limit=1,sort=nearest] {Health:100f}
Raising max_health does not heal the mob, so set its current Health as well. For a player, use /effect give @s minecraft:instant_health 1 10 after raising max_health instead, because player data cannot be edited with /data.
Longer reach
/attribute @s minecraft:block_interaction_range base set 8
/attribute @s minecraft:entity_interaction_range base set 6
Player defaults are 4.5 for blocks and 3 for entities. On 1.20.5–1.21.1 the names start with minecraft:player. instead.
Check and reset
/attribute @s minecraft:scale get
/attribute @s minecraft:scale base set 1
get prints the current value. To reset, set the default from the table again.
Common problems
- Unknown attribute: use
generic.on 1.21.1 and earlier and no prefix on 1.21.2 and later. - The value looks wrong: armor and effects such as Speed also change the final value. Check it with
get. - Bedrock Edition: there is no /attribute. Use effects such as speed and jump_boost instead.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.