Updated:

Make a player twice as big

VersionCommand
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

ChangesName (1.21.2+)Default
Sizeminecraft:scale1
Walking speedminecraft:movement_speed0.1
Jump strengthminecraft:jump_strength0.42
Step heightminecraft:step_height0.6
Gravityminecraft:gravity0.08
Safe fall distanceminecraft:safe_fall_distance3
Max healthminecraft:max_health20

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

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.