PT-BR EN ES
Channel Icon

Crazy Ozz

Official Channel Website

Command Block

Minecraft Attribute Command Generator Java Edition

Use this Attribute Command Generator to read the value of an attribute, set the base, add/remove modifiers, or query the value of a specific modifier in Minecraft Java Edition. Choose the target, attribute, and operation below and copy the ready-to-use command.

Operation

Target

Values

Multiplies the returned value. Useful for dummy scores via scoreboard.

Attribute

Generated Attribute Command

attribute @s minecraft:max_health get
Version:

Want to create a cheap and lag-free Minecraft server?

I highly recommend Sparked Host: affordable plans, great performance, easy-to-use panel, and fast support.

🚀 Create a server on Sparked Host

How to Use the Attribute Command Generator

This generator builds complete Attribute commands. First, choose your desired operation, then select the attribute from the list on the right (filtering by category, if you prefer), and fill in the required values for that operation.

Example of a generated command:

/attribute @s minecraft:max_health base set 40

This command sets the base maximum health of "@s" to 40 points (20 hearts).

Available Operations

get

Reads the current total value of the attribute (base + all applied modifiers).

set (base set)

Redefines the base value of the entity's attribute, ignoring modifiers.

modifier add

Adds a modifier identified by an ID, adding to or multiplying the base value.

modifier remove

Removes a previously added modifier using the same ID.

modifier value

Reads the current value of a specific modifier by its ID.

Frequently Asked Questions

What is the /attribute command used for in Minecraft?

The /attribute command reads and modifies numerical properties of an entity, such as maximum health, movement speed, attack damage, and dozens of others.

What is the difference between "get", "base set", and "modifier add"?

"get" reads the current total value of the attribute, "base set" redefines the base value of the entity, and "modifier add" adds a modifier that adds to or multiplies the base value without changing it directly.

What does the scale parameter do?

The scale multiplies the value returned by "get" or "modifier value get", which is useful for converting decimal values into integers compatible with scoreboards.

Did attribute names change between versions?

Yes. Up until 1.21.1, many attributes used the "generic." prefix, like minecraft:generic.max_health. As of 1.21.2, this prefix was removed, making it just minecraft:max_health.

Related Generators