How to Use the Attribute Command in Minecraft
This Minecraft tutorial explains how to use the /attribute command with screenshots and step-by-step instructions.
You can use the /attribute command to get the total value of an attribute, get the base value of an attribute, set the base value of an attribute, or work with attribute modifiers for a targeted entity in Minecraft. Let's explore how to use this cheat (game command).
Supported Platforms
The /attribute command is available in the following versions of Minecraft:
Platform | Supported (Version*) |
---|---|
Java Edition (PC/Mac) | Yes (1.16) |
Pocket Edition (PE) | No |
Xbox 360 | No |
Xbox One | No |
PS3 | No |
PS4 | No |
Wii U | No |
Nintendo Switch | No |
Windows 10 Edition | No |
Education Edition | No |
* The version that it was added or removed, if applicable.
NOTE: Pocket Edition (PE), Xbox One, PS4, Nintendo Switch, and Windows 10 Edition are now called Bedrock Edition. We will continue to show them individually for version history.
Requirements
To run game commands in Minecraft, you have to turn cheats on in your world.
Attribute Command
Examples
How to Enter the Command
1. Open the Chat Window
The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:
- For Java Edition (PC/Mac), press the T key to open the chat window.
2. Type the Command
In this example, we will set the base value for the Max Health attribute for DigMinecraft to 30 in Minecraft Java Edition (PC/Mac) with the following command:
/attribute DigMinecraft generic.max_health base set 30
Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.
Once the cheat has been entered, the base value for the attribute will be updated.
You will see the message "Base value for attribute Max Health for entity DigMinecraft set to 30.0" appear in the lower left corner of the game window to indicate that the base value of the attribute has been successfully updated.
Since the Max Health for DigMinecraft was originally 20.0 as represented by 10 hearts in the health bar, you should now see 5 additional hearts appear in the health bar above the original 10 hearts (showing a total of 15 hearts). These 5 new hearts can be replenished by your food bar.
Congratulations, you just learned how to use the /attribute command in Minecraft!
Advertisements