Minecraft /attribute Command Generator
The /attribute command is a powerful tool for controlling all entity stats in Minecraft. This generator simplifies its complex syntax, allowing you to easily change player and mob health, speed, size, and more. Create your own custom attribute commands with just a few clicks.
Attribute
Select the attribute to modify.
Operation
Value
Generated Command
Command Usage Examples
1. Giant Zombie Boss
Create a formidable boss by scaling its size by 5x, and accordingly setting its health to 200 (100 hearts), attack damage to 10 (5 hearts), and knockback resistance to 100% to make it immovable.
/attribute @e[type=zombie,limit=1,sort=nearest] generic.scale base set 5
/attribute @e[type=zombie,limit=1,sort=nearest] generic.max_health base set 200
/attribute @e[type=zombie,limit=1,sort=nearest] generic.attack_damage base set 10
/attribute @e[type=zombie,limit=1,sort=nearest] generic.knockback_resistance base set 1/attribute @e[type=zombie,limit=1,sort=nearest] generic.scale base set 5
/attribute @e[type=zombie,limit=1,sort=nearest] generic.max_health base set 200
/attribute @e[type=zombie,limit=1,sort=nearest] generic.attack_damage base set 10
/attribute @e[type=zombie,limit=1,sort=nearest] generic.knockback_resistance base set 12. Speed Runner: Enhancing Player Movement
To double a player's default movement speed (0.1), you can add a `multiply_base` modifier of 1.0 (100%). This adds 0.1 * 1.0 = 0.1 to the base value of 0.1, for a total of 0.2.
/attribute @p generic.movement_speed modifier add 51b1a4a4-6b2e-4360-9d04-136181f42d2a fast_runner multiply_base 1.0/attribute @p generic.movement_speed modifier add 51b1a4a4-6b2e-4360-9d04-136181f42d2a fast_runner multiply_base 1.03. Unreachable Reach: Increasing Block Interaction Range
Increase the maximum distance for placing or breaking blocks in survival mode. The default value is 4.5. Increasing it to 10 allows interaction with distant blocks.
/attribute @p player.block_interaction_range base set 10/attribute @p player.block_interaction_range base set 10Frequently Asked Questions (FAQ)
Q. What's the difference between `base set` and `modifier add`?
`base set` permanently changes the 'base value' of an attribute. For example, a player's default max_health is 20. If you set it to 40, that player will always have 40 health. On the other hand, `modifier add` adds a temporary or permanent 'modifier' that changes the stat by adding to or multiplying the base value. Stat bonuses on items and equipment use this modifier system. Modifiers can be removed at any time via their UUID, allowing for much more flexible control.
Q. What is a modifier's UUID, and do I have to enter it manually?
A UUID is a unique ID that identifies each modifier. You need this UUID to remove a specific modifier later (`modifier remove`). In our generator, you can leave the UUID field blank to have a random one generated each time the command is run. If you need more precise control, like giving an effect only when a specific item is held and removing it otherwise, it's better to use a predetermined UUID. With data packs, you can assign modifiers with specific UUIDs to items, allowing for very fine-grained control over stat changes.
Q. How are the modifier operations (add, multiply, multiply_base) different?
The three operations differ in the order and method of calculation. 1. `add` (Operation 0): Simply adds the value to the base value. For example, if the base movement speed is 0.1 and you add 0.1 with an `add` operation, the final speed is 0.2. If there are multiple `add` modifiers, they are all summed up. 2. `multiply_base` (Operation 1): Multiplies the value by the result of (base value + sum of all `add` operations) and adds it to the total. For example, if the speed after `add` is 0.2, and you add a `multiply_base` of 0.5 (50%), it adds 0.2 * 0.5 = 0.1, for a final speed of 0.3. 3. `multiply` (Operation 2): Multiplies the result of all previous calculations by (1 + value). This is often used for percentage-based increases and stacks multiplicatively. For example, if the speed after the previous steps is 0.3, and you add a `multiply` modifier of 0.2 (20%), the final speed becomes 0.3 * (1 + 0.2) = 0.36.
Q. I used `generic.scale` to increase an entity's size, but its health and damage are the same. Do they scale together?
No, the `generic.scale` attribute only changes the visual size and hitbox of an entity. Other stats like health, attack damage, and movement speed are not linked to the `scale` value and must be modified separately using `/attribute` on `generic.max_health`, `generic.attack_damage`, etc. If you want to create a giant boss monster, it's best to adjust `scale`, `max_health`, `attack_damage`, and `knockback_resistance` all together.
Q. I want to slightly increase the movement speed of all players on my server. How do I do that?
The simplest way is to use a Repeating Command Block. Enter a command like `/attribute @a generic.movement_speed base set 0.12` in a command block and set it to 'Always Active'. This will continuously set the base movement speed for all players to 0.12 (default is 0.1). Alternatively, you could use a data pack with a `tick.json` function to apply a modifier to all players every tick.
Q. Can I make a player's jump height increase only when they stand on a specific block?
Yes, this is possible by combining data packs or repeating command blocks. For example, in a repeating command block, you could use `/execute as @a at @s if block ~ ~-0.1 ~ minecraft:emerald_block run attribute @s generic.jump_strength modifier add <UUID> jump_boost add 0.2`. This gives a jump boost modifier to any player standing on an emerald block. Another command block can then remove the modifier from players not on an emerald block. Combining `/execute` like this allows for very complex and creative mechanics.
Q. The command I generated is too long to fit in the chat window.
The Minecraft chat has a character limit (default 256). Commands can easily exceed this, especially with multiple modifiers or complex NBT data. In this case, use a 'Command Block', which has no character limit. You can get one with the command `/give @p command_block`.
`/attribute` Deep Dive: Design Your Own Minecraft
Minecraft is more than a game of building and exploring; it's a vast canvas for realizing your imagination. One of the most powerful brushes for this canvas is the `/attribute` command. Mastering this command means more than just changing game rules; it signifies ascending to the level of a designer who can create entirely new game mechanics and content. In this article, we'll cover everything from the basics of the `/attribute` command to expert-level tips that will unleash your creativity.
1. What are Attributes: The Hidden Blueprint of Entities
Every entity in Minecraft—players, zombies, cows, even item frames—has its own set of 'attributes'. Attributes are a collection of data values that define an entity's inherent characteristics. 'max_health' determines how much damage it can withstand, while 'movement_speed' dictates how fast it moves. Think of it as a car's blueprint, detailing engine displacement, top speed, and chassis strength. The `/attribute` command gives you the special permission to access and modify this blueprint directly. While enchantments and potions 'adjust' stats within set rules, `/attribute` 'redefines' the rules themselves. A Potion of Swiftness temporarily increases speed, but `/attribute` can permanently change the player's 'base' movement speed.
2. Base vs. Modifier: The Two Pillars of Stat Calculation
There are two main ways to handle attributes with the `/attribute` command: 'setting the base value' and 'managing modifiers'. Understanding the difference is key to using `/attribute` effectively. **Base: The Foundation of an Attribute** The 'base' is, as the name implies, the most fundamental value of a stat. The `base set` operation completely overwrites this value. This is a permanent change and becomes the reference point for all other calculations. For example, `attribute @p generic.max_health base set 40` permanently changes a player's base max health from 20 (10 hearts) to 40 (20 hearts). This is useful for changing base stats upon a class change in an RPG server or giving a player a permanent passive ability. **Modifier: The Key to Flexible Change** A 'modifier' is a change applied on top of the base value. The extra damage from an enchanted sword or the defense from armor are all internally handled by modifiers. Modifiers can be added with `modifier add` and removed with `modifier remove`, allowing for dynamic and flexible management. Each modifier has a unique UUID, so you can pick out and remove the exact one you want from many. You can also assign a 'name' to a modifier, which serves as a comment for other admins. For example, an effect that makes a player stronger only when holding a specific item can be implemented by storing a modifier with a specific UUID in the item's NBT data and continuously checking if the player is holding it (`/execute if data`) to add or remove the modifier. This is an essential technique for creating special equipment or regional effects in adventure maps and RPG servers.
3. The Secret of Modifier Operations: add, multiply, and multiply_base
The true power of modifiers comes from three different operations. Minecraft processes these operations in a specific order to calculate the final stat: `add` -> `multiply_base` -> `multiply`. - **Step 1: `add` (Operation 0)** This is the first and simplest calculation: a direct sum. It adds the modifier's value to the base value. For example, if the base attack damage is 1, and you add two `add` modifiers of +2 and +3, the total damage at this stage is 1 + 2 + 3 = 6. This is typically used for fixed stat bonuses like '+5 Attack Damage' on equipment. - **Step 2: `multiply_base` (Operation 1)** This operation takes the value calculated so far (base value + sum of `add` modifiers), multiplies it by its own value, and 'adds' the result. The name can be confusing; it doesn't multiply the total, but rather 'adds' an amount proportional to the current value. For example, if the damage after Step 1 is 6, and you add a `multiply_base` modifier of +0.5 (50%), it adds 6 * 0.5 = 3, bringing the total damage to 6 + 3 = 9. This is useful when you want to provide a bonus proportional to the sum of the base stat and flat bonuses. - **Step 3: `multiply` (Operation 2)** The final step. It multiplies the total of all previous calculations by (1 + its value). This is often compared to 'compound interest' and is most powerful for implementing percentage-based effects. For example, if the damage after Step 2 is 9, and you add a `multiply` modifier of +0.2 (20%), the final damage becomes 9 * (1 + 0.2) = 10.8. If you add another `multiply` modifier of +0.3 (30%), it becomes 10.8 * (1 + 0.3) = 14.04. Potion effects like Swiftness and Strength work this way and are key to creating multiple stacking buff effects. Understanding and combining these three operations allows you to design complex and interesting stat progression curves far beyond simple addition.
4. Practical Examples: Turning Imagination into Reality
Now let's look at some exciting examples that apply these concepts in-game. - **Creating a Giant Zombie Boss** You can create a formidable boss by scaling its size by 5x, and accordingly setting its health to 200 (100 hearts), attack damage to 10 (5 hearts), and knockback resistance to 100% to make it immovable. `/attribute @e[type=zombie,limit=1,sort=nearest] generic.scale base set 5` `/attribute @e[type=zombie,limit=1,sort=nearest] generic.max_health base set 200` `/attribute @e[type=zombie,limit=1,sort=nearest] generic.attack_damage base set 10` `/attribute @e[type=zombie,limit=1,sort=nearest] generic.knockback_resistance base set 1` - **Speed Runner: Enhancing Player Movement** To double a player's default movement speed (0.1), you can add a `multiply_base` modifier of 1.0 (100%). This adds 0.1 * 1.0 = 0.1 to the base value of 0.1, for a total of 0.2. `/attribute @p generic.movement_speed modifier add 51b1a4a4-6b2e-4360-9d04-136181f42d2a fast_runner multiply_base 1.0` - **Unreachable Reach: Increasing Block Interaction Range** Let's use the `player.block_interaction_range` attribute, which increases the maximum distance for placing or breaking blocks in survival mode. The default value is 4.5. Increasing it to 10 allows interaction with distant blocks, which can be useful for building or specific map mechanics. `/attribute @p player.block_interaction_range base set 10` The `/attribute` command opens a door to limitless possibilities for bringing your imagination to life in the world of Minecraft. Use our generator to break free from complex syntax and unleash your creative ideas. What will you create next?
/attribute Command: A Deep Dive into Minecraft's Stats
The `/attribute` command in Minecraft is a powerful tool that allows you to check and directly modify the unique stats of any entity, including players and mobs. This command enables map makers and server admins to create unique experiences beyond the limits of normal gameplay. For example, you can increase a player's max health to 100 hearts, double their movement speed, or even make an entity gigantic. This generator simplifies the potentially complex syntax of the `/attribute` command with an intuitive interface, helping anyone easily set up their own custom stats. From target selection and attribute types to directly setting values with 'base set' or making persistent changes with 'modifiers', you can combine all options with just a few clicks to generate and copy the command in real-time.