This Minecraft tutorial explains how to use the /attribute command with screenshots and step-by-step instructions. Show 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 PlatformsThe /attribute command is available in the following versions of Minecraft:
* The version that it was added or removed, if applicable. RequirementsTo run game commands in Minecraft, you have to turn cheats on in your world. Attribute Command
Attribute Command in Minecraft Java Edition (PC/Mac)In Minecraft Java Edition (PC/Mac), there are different syntaxes depending on what you would like to do with the attribute. To get the total value of an attribute for a targeted entity: /attribute <target> <attribute> get [scale] To get the base value of an attribute for a targeted entity: /attribute <target> <attribute> base get [scale] To set the base value of an attribute for a targeted entity: /attribute <target> <attribute> base set <value> To add a modifier to an attribute for a targeted entity (fails if a modifier already exists for that attribute): /attribute <target> <attribute> modifier add <uuid> <name> <value> add¦multiply¦multiply_base To get the value of a modifier for an attribute for a targeted entity: /attribute <target> <attribute> modifier value get <uuid> [scale] To remove a modifier from an attribute for a targeted entity: /attribute <target> <attribute> modifier remove <uuid> Definitions
Examples
Example in Java Edition (PC/Mac)To get the total value of the Jump Strength attribute for the nearest horse: /attribute @e[type=horse,sort=nearest,limit=1] horse.jump_strength get To get the total value of the Jump Strength attribute of a specific horse using its UUID value (universally unique identifier): /attribute f439a454-a7a3-4b2e-b38f-e4a2ad2da676 horse.jump_strength get To get the base value of the Max Health attribute for the player named DigMinecraft: /attribute DigMinecraft generic.max_health base get To set the base value of the Max Health attribute for the player named DigMinecraft: /attribute DigMinecraft generic.max_health base set 30 How to Enter the Command1. Open the Chat WindowThe 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:
2. Type the CommandIn 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! Other Game CommandsYou can use other commands and cheats in Minecraft such as: |