Choose a command Available editors: 23 / 23

Choose a command or select its information icon to see how it works.

Players and items

World and building

Display and game systems

/attribute

Editor available

What does it do?

Imagine a zombie with lots of health or an unusually fast mob. This command lets you inspect or change entity attributes such as maximum health or movement speed.

When is it useful?

Useful for custom mobs, difficult bosses, and special challenges.

Example

/attribute @p minecraft:max_health get

What will happen?

The command displays the nearest player's maximum-health attribute.

Good to know

This example uses the Java 1.21.2+ attribute name. Older versions use a different ID.

Minecraft Java · 1.16+

/attribute

Read and change entity attributes such as health, speed, damage and modifiers.

Total visits 26My visits 0

Command settings

Generated command

—

What happens

Base and total

The total includes active modifiers applied to the base.

Add a bonus

Choose an operation and modifier ID. Before 1.21, enter a UUID.

Why a command can fail

Target one entity with the selected attribute.

FAQ Frequently asked questions 30 questions
Essential questions 5
What is /attribute used for?

It reads or changes an attribute of one entity, such as maximum health or movement speed. It is not the same as a potion effect.

Can I change player attributes?

Yes, provided the player supports the attribute. Changing maximum health does not necessarily restore the player's current health immediately.

Can I change mob attributes?

Yes, it works with supported mobs. The selected entity must actually have the requested attribute, otherwise Minecraft reports an error.

How are attributes different from potion effects?

An attribute defines an entity property, while effects may temporarily modify its final value. The /effect and /attribute commands serve different purposes.

Can one command change multiple entities?

The target argument requires a single entity. Use separate executions, such as an appropriate /execute command, to process multiple targets.

Syntax and arguments 5
What does base get mean?

It retrieves the base value of the selected attribute. This is useful when you need the underlying setting without modifiers.

What does plain get mean?

It retrieves the total attribute value after applicable modifiers. The result can differ from the base get value.

How does base set work?

It writes a new base attribute value for the selected entity. The value must satisfy the limits of that particular attribute.

What does base reset do?

It restores the attribute base value to its default. It is not designed to remove every additional attribute modifier.

How do I select an attribute?

Use its registered identifier, such as minecraft:max_health. Availability depends on the Minecraft version and entity type.

Practical examples 5
How do I read my maximum health?

Run /attribute @s minecraft:max_health base get as a player. It returns the base maximum-health attribute value.

How do I increase maximum health?

For example, /attribute @s minecraft:max_health base set 30 sets the base value to 30. Check current health separately afterward.

How do I restore normal maximum health?

Run /attribute @s minecraft:max_health base reset. This restores the base setting but does not remove independent modifiers.

How do I inspect movement speed?

Use /attribute @s minecraft:movement_speed base get. The number is an attribute value, not a direct speed measurement in kilometres per hour.

Can I change an entity's size?

Supported versions provide the minecraft:scale attribute for suitable entities. Check its allowed range and whether the entity supports it.

Advanced usage 5
What is an attribute modifier?

It is a separate adjustment that affects the resulting attribute value. Multiple modifiers can interact with the base value according to their operations.

How do I add a modifier?

Use modifier add with a unique ID, amount, and operation. Check that the same modifier ID does not already exist.

How do I remove one modifier?

Use modifier remove with the exact identifier of an existing modifier. This is different from resetting the base attribute value.

What modifier operations are supported?

Modern Java uses add_value, add_multiplied_base, and add_multiplied_total. Each applies the modifier amount differently.

What does the get scale argument do?

It scales the returned command result. Reading the attribute with a scale does not change the entity's actual attribute.

Troubleshooting 4
Why can the command not find my target?

The selector may match no entity or multiple entities instead of exactly one. Check the target and result limit.

Why is the attribute unknown?

The attribute ID may be incorrect or unavailable in the game version. The selected entity may also lack that attribute.

Why does the change behave unexpectedly?

Other modifiers and game limits can affect the result. Compare base get with plain get after making the change.

Why does modifier add fail?

The modifier ID may already exist or an argument may be invalid. Check the identifier, numeric value, and operation name.

Minecraft versions 3
Why do old operation names fail?

Java 1.20.5 renamed modifier operations. Older add or multiply syntax from legacy guides may no longer work.

Why does an old modifier UUID syntax fail?

Java 1.21 replaced the older UUID and name arguments with a single modifier identifier. Older instructions need adaptation.

When was base reset added?

Java Edition 1.21.4 introduced base reset. Older versions require another method for restoring the base value.

Permissions and safety 3
What permissions does /attribute require?

It normally requires permission level 2. Ordinary players on public servers cannot freely modify other players' attributes.

Why are extreme values risky?

Extreme attribute values can disrupt movement, balance, or entity interactions. Test changes in a separate world first.

How can I safely revert attribute changes?

Record the original base value and affected modifier IDs before changing anything. Restore them with base reset or exact values afterward.

Minecraft Wiki reference

Reviews for this page

No published reviews yet.

All WopBlockStudio reviews

Rate this tool

Did this tool work for you? Tell us what went well or what could improve.

Sign in to leave a review
Rating from 1 to 5