Attribute Command - Get, Set and Modify Entity Stats

Build an /attribute command to read, set or modify any entity attribute: health, speed, attack damage, scale and more.

Generated Command

/attribute @s minecraft:max_health get
Version
Loading...

The /attribute command reads and changes entity stats. Use get to read a value, base set to change the default, or modifiers to stack adjustments on top.

What Is the Minecraft Attribute Command?

The /attribute command reads, sets, and modifies the numerical stats that control how entities behave: max health, movement speed, attack damage, scale, gravity, and more. This generator builds the correct syntax for any of those operations without editing NBT data directly.

Attributes define how entities perform. A player's max_healthdefaults to 20 (10 hearts) and a zombie's movement_speed is 0.23. The /attribute command changes these values at runtime, which makes it essential for custom boss mobs, minigame mechanics, and player scaling.

Each command targets one entity selector and one attribute, then applies an operation: get reads a value, base set changes the default, and modifier stacks adjustments on top using the three operation types.

Attribute Command Syntax Variants

CommandEffect
/attribute @s minecraft:max_health getReads your current max health value
/attribute @s minecraft:max_health base set 40Sets your base max health to 40 (20 hearts)
/attribute @s minecraft:movement_speed modifier add speed_boost 0.5 add_multiplied_baseAdds a modifier that raises speed by 50% of the base
/attribute @s minecraft:scale base set 5Makes you five times your normal size
/attribute @e[limit=1] minecraft:gravity base set 0Removes gravity from the nearest entity so it floats

Modifier operations: add_value adds a flat number to the base. add_multiplied_base multiplies the base by a percentage (0.5 = +50% of base). add_multiplied_total multiplies the running total after the other operations. Order matters: add_value runs first, then add_multiplied_base, then add_multiplied_total.

Common Uses for the Attribute Command

Boss mobs: raise max_health and attack_damage, then set scale to 3 to 5 for a giant that hits hard and soaks damage. After raising max health upward, top the mob off with an Instant Health effect to fill the new pool.

Custom movement: set gravity to 0 for floating entities or a negative value for entities that fall upward. Raise step_height to 3 so mobs walk over fences and walls, and increase safe_fall_distance to make entities immune to fall damage from any height.

Frequently Asked Questions

What are attributes in Minecraft?

Attributes are numerical properties that control entity behavior: max health, movement speed, attack damage, armor, gravity, scale, and more. They can be modified with the /attribute command, through NBT data, or via enchantments and equipment.

How do you change a mob's max health with commands?

Use /attribute @e[type=minecraft:zombie,limit=1] minecraft:max_health base set 100 to set a zombie's max health to 100 HP (50 hearts). After changing max health upward, heal the mob with /effect give Instant Health to fill the new health pool.

What is the difference between base values and modifiers?

Base values are the default attribute number (player max_health base = 20). Modifiers are adjustments applied on top of the base using three operations: add_value (flat addition), add_multiplied_base (percentage of base), and add_multiplied_total (percentage of running total). Equipment, enchantments, and effects all work through modifiers.

How do I make a giant or tiny mob?

Set minecraft:scale with base set, for example /attribute @e[limit=1] minecraft:scale base set 5 for a mob five times its normal size, or 0.2 for a tiny version. Scale changes the hitbox, model size, and step height proportionally.

Browse more Minecraft tools: