Attribute
An attribute is a value that determines certain properties of mobs, armor stands, and players. Attributes also have modifiers that adjust the strength of their effects.
Applying attributes
Attributes can be applied directly to living entities using the /attribute command. The below command is an example that dramatically increases the luck attribute, leading to the player being able to fish treasures nearly every time:
/attribute @p minecraft:luck base set 1024
After it's modified, it can then be reset to the default value (which is 0.0 for minecraft:luck attribute):
/attribute @p minecraft:luck base reset
Additionally, attribute values can be specified when summoning a mob. For example, the following command summons a zombie that follows players when they are 100 blocks or fewer from it instead of the usual 40:
/summon zombie ~ ~ ~ {attributes:[{id:"follow_range", base:100.0d}]}
Item modifiers
Attributes can also be applied as attribute modifiers on items by using data components. When applied to an item, a modifier adjusts the corresponding attribute if the item is held or worn.[1][2] Attribute modifiers can be added to items by adding data tags to the item. Each attribute modifier has a unique identifier, which is a resource location to identify the modifier.
The following command gives the player a netherite sword that deals 20HP × 10 extra damage:
/give @s netherite_sword[attribute_modifiers=[{type:"attack_damage", amount:20.0, operation:"add_value", id:"example:custom_damage", slot:"mainhand"}]]
Attributes
A single attribute controls some property of an entity, described by its name; it has a base value, set within hard-coded minimum and maximum limits, and if undefined, it's specified by the default value. The base value may be multiplied or added by a set of modifiers; these affect the attribute's base, but the calculated value is always capped by the minimum and maximum.
Attribute modifiers have namespaced identifiers. If two modifiers have the same ID and affect the same attribute, then they do not stack; instead, only the one most recently added takes effect, overriding previous modifiers.
These attributes are found on all living and undead entities, including players.
Armor
| ID |
|
|---|---|
| Default |
0 () |
| Minimum |
0 () |
| Maximum |
30 ( × 15) |
{
"title": "Armor",
"rows": [
{
"field": "<code>armor</code>",
"label": "ID"
},
{
"field": "0 (<span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"0 armor points\">(link to File:Empty Armor (icon).png article, displayed as 9px|link=|alt=🛡)</span>)",
"label": "Default"
},
{
"field": "0 (<span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"0 armor points\">(link to File:Empty Armor (icon).png article, displayed as 9px|link=|alt=🛡)</span>)",
"label": "Minimum"
},
{
"field": "30 (<span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"2 armor point\">(link to File:Armor (icon).png article, displayed as 9px|link=|alt=🛡)</span> × 15)",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute defines the armor defense points.
| Entity | Default value |
|---|---|
| 8 () | |
| 4 () | |
| 2 () | |
| All other entities | 0 () |
Armor toughness
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
20 |
{
"title": "Armor toughness",
"rows": [
{
"field": "<code>armor_toughness</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "20",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute defines armor toughness.
Attack damage
| ID |
|
|---|---|
| Default |
2HP |
| Minimum |
0HP |
| Maximum |
2048HP × 1024 |
{
"title": "Attack damage",
"rows": [
{
"field": "<code>attack_damage</code>",
"label": "ID"
},
{
"field": "2<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"1 heart\">(link to File:Heart (icon).png article, displayed as 9px|link=|alt=❤️)</span></span>",
"label": "Default"
},
{
"field": "0<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"0 hearts\">(link to File:Empty Heart (icon).png article, displayed as 9px|link=|alt=🖤)</span></span>",
"label": "Minimum"
},
{
"field": "2048<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"1 heart\">(link to File:Heart (icon).png article, displayed as 9px|link=|alt=❤️)</span> × 1024</span>",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute defines the damage dealt by attacks, in half-hearts.
| Entity | Default value |
|---|---|
| 50HP × 25 | |
| 30HP × 15 | |
| 12HP × 6 | |
| 10HP | |
| 8HP | |
| 7HP | |
| 6HP | |
| 5HP | |
| 4HP | |
| 3HP | |
| 1HP | |
| 0HP | |
| Passive mobs | N/A |
| All other entities | 2HP |
Attack knockback
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
5 |
{
"title": "Attack knockback",
"rows": [
{
"field": "<code>attack_knockback</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "5",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute defines the knockback applied to attacks.[more information needed] It applies only to mobs with physical attacks.[3]
| Entity | Default value |
|---|---|
| 1.5 | |
| 1 | |
All other entities |
0 |
Attack reach
| ID |
|
|---|---|
| Default |
2.5 |
| Minimum |
0 |
| Maximum |
6 |
{
"title": "Generic.attack reach",
"rows": [
{
"field": "<code>generic.attack_reach</code>",
"label": "ID"
},
{
"field": "2.5",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "6",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the reach at which players can attack entities. It does not affect the interaction range.
Attack speed
| ID |
|
|---|---|
| Default |
4 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Attack speed",
"rows": [
{
"field": "<code>attack_speed</code>",
"label": "ID"
},
{
"field": "4",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines recharging rate of attack strength. Its value is the number of full-strength attacks per second.
Block break speed
| ID |
|
|---|---|
| Default |
1 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Block break speed",
"rows": [
{
"field": "<code>block_break_speed</code>",
"label": "ID"
},
{
"field": "1",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the speed at which the player can break blocks as a multiplier.
Block interaction range
| ID |
|
|---|---|
| Default |
4.5 |
| Minimum |
0 |
| Maximum |
64 |
{
"title": "Block interaction range",
"rows": [
{
"field": "<code>block_interaction_range</code>",
"label": "ID"
},
{
"field": "4.5",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "64",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the block interaction range for players in blocks.
In Creative mode, the block interaction range is increased by 0.5 to make some actions easier. This does not affect the base value of the attribute, so the bonus acts as a modifier.
Burning time
| ID |
|
|---|---|
| Default |
1 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Burning time",
"rows": [
{
"field": "<code>burning_time</code>",
"label": "ID"
},
{
"field": "1",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is a multiplier for how long an entity should remain on fire after being ignited. A value of 0 eliminates the burn time. It has no impact on the burning time increase when staying in fire.
Camera distance
| ID |
|
|---|---|
| Default |
4 |
| Minimum |
0 |
| Maximum |
32 |
{
"title": "Camera distance",
"rows": [
{
"field": "<code>camera_distance</code>",
"label": "ID"
},
{
"field": "4",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "32",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the distance at which the camera is placed away from the player or spectated entity when in a third-person view. This distance is multiplied by the scale attribute to get a final target camera distance. If the entity being ridden has a larger camera_distance attribute, that distance will be used.
| Entity | Default value |
|---|---|
| 8 | |
| 16 | |
| All other entities[verify] | 4 |
Entity interaction range
| ID |
|
|---|---|
| Default |
3 |
| Minimum |
0 |
| Maximum |
64 |
{
"title": "Entity interaction range",
"rows": [
{
"field": "<code>entity_interaction_range</code>",
"label": "ID"
},
{
"field": "3",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "64",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the entity interaction range for players in blocks.
In Creative mode, the entity interaction range is increased by 2 to make some actions easier. This does not affect the base value of the attribute, so the bonus acts as a modifier.
Explosion knockback resistance
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Explosion knockback resistance",
"rows": [
{
"field": "<code>explosion_knockback_resistance</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute defines what percentage of knockback from explosions an entity resists. A value of 1 eliminates the knockback.
Fall damage multiplier
| ID |
|
|---|---|
| Default |
1 |
| Minimum |
0 |
| Maximum |
100 |
{
"title": "Fall damage multiplier",
"rows": [
{
"field": "<code>fall_damage_multiplier</code>",
"label": "ID"
},
{
"field": "1",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "100",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the amount of fall damage an entity takes as a multiplier.
| Entity | Default value |
|---|---|
| 0.5 | |
| All other entities | 1 |
Flying speed
| ID |
|
|---|---|
| Default |
0.4 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Flying speed",
"rows": [
{
"field": "<code>flying_speed</code>",
"label": "ID"
},
{
"field": "0.4",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is a flight speed modifier in some unknown metric.[more information needed]
| Entity | Default value |
|---|---|
| 0.6 | |
| 0.1 | |
| 0.05 | |
| All other entities | 0.4 |
Follow range
| ID |
|
|---|---|
| Default |
32 |
| Minimum |
0 |
| Maximum |
2048 |
{
"title": "Follow range",
"rows": [
{
"field": "<code>follow_range</code>",
"label": "ID"
},
{
"field": "32",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "2048",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the range in blocks within which a mob with this attribute targets players or other mobs to track. Exiting this range causes the mob to cease following the player/mob.
| Entity | Default value |
|---|---|
| 100 | |
| 64 | |
| 48 | |
| 40 | |
| 35 | |
| 32 | |
| 24 | |
| 20 | |
| 18 | |
| 12 | |
| All other entities | 16 |
Gravity
| ID |
|
|---|---|
| Default |
0.08 |
| Minimum |
-1 |
| Maximum |
1 |
{
"title": "Gravity",
"rows": [
{
"field": "<code>gravity</code>",
"label": "ID"
},
{
"field": "0.08",
"label": "Default"
},
{
"field": "-1",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the gravity affecting an entity in blocks per tick squared.
Jump strength
| ID |
|
|---|---|
| Default |
0.42[note 1] |
| Minimum |
0 |
| Maximum |
32 |
| |
{
"title": "Jump strength",
"images": [],
"rows": [
{
"field": "<code>jump_strength</code>",
"label": "ID"
},
{
"field": "0.42",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "32",
"label": "Maximum"
}
],
"invimages": [],
"footer": "'\"`UNIQ--references-00000145-QINU`\"'"
}
This attribute determines the initial vertical velocity of an entity when they jump, in blocks per tick.
| Entity | Default value |
|---|---|
| Random (0.4–1.0) | |
| 0.175 | |
| All other entities | 0.42 |
Knockback resistance
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Knockback resistance",
"rows": [
{
"field": "<code>knockback_resistance</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the scale of horizontal knockback resisted from attacks and projectiles. Vertical knockback is not affected. It does not affect explosions.[4] The resistance functions as a percentage from 0.0 (0% resistance) to 1.0 (100% resistance) (e.g. 0.4 is 40% resistance, meaning the attributed mob takes 60% of usual knockback). Iron golems and wardens suffer zero knockback from attacks or projectiles.
| Entity | Default value |
|---|---|
| 1 | |
| 0.75 | |
| 0.6 | |
| All other entities | 0 |
Luck
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
-1024 |
| Maximum |
1024 |
{
"title": "Luck",
"rows": [
{
"field": "<code>luck</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "-1024",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute affects the results of loot tables using the quality or bonus_rolls tag (e.g. when opening chests or chest minecarts, fishing, and killing mobs).
Max absorption
| ID |
|
|---|---|
| Default |
0HP |
| Minimum |
0HP |
| Maximum |
2048HP × 1024 |
{
"title": "Max absorption",
"rows": [
{
"field": "<code>max_absorption</code>",
"label": "ID"
},
{
"field": "0<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"0 absorption hearts\">(link to File:Empty Heart (icon).png article, displayed as 9px|link=|alt=🖤)</span></span>",
"label": "Default"
},
{
"field": "0<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"0 absorption hearts\">(link to File:Empty Heart (icon).png article, displayed as 9px|link=|alt=🖤)</span></span>",
"label": "Minimum"
},
{
"field": "2048<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"1 absorption heart\">(link to File:Absorption Heart (icon).png article, displayed as 9px|link=|alt=❤️)</span> × 1024</span>",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is the maximum absorption of this entity (in half-hearts); it determines the highest health they may gain by the Absorption effect.
Max health
| ID |
|
|---|---|
| Default |
20HP × 10 |
| Minimum |
1HP |
| Maximum |
1024HP × 512 |
{
"title": "Max health",
"rows": [
{
"field": "<code>max_health</code>",
"label": "ID"
},
{
"field": "20<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"1 heart\">(link to File:Heart (icon).png article, displayed as 9px|link=|alt=❤️)</span> × 10</span>",
"label": "Default"
},
{
"field": "1<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"0.5 hearts\">(link to File:Half Heart (icon).png article, displayed as 9px|link=|alt=💔)</span></span>",
"label": "Minimum"
},
{
"field": "1024<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"1 heart\">(link to File:Heart (icon).png article, displayed as 9px|link=|alt=❤️)</span> × 512</span>",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is the maximum health of the entity in half-hearts. It determines the highest health they may be healed to. If the player is using this to summon a mob with high health, use this and the Health tag; for example: {Health:200.0f}.[verify]
| Entity | Default value |
|---|---|
| Any entity | The maximum health of the entity. See Health § Entities' health for a full list. |
Mining efficiency
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Mining efficiency",
"rows": [
{
"field": "<code>mining_efficiency</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is a factor to speed up the mining of blocks when using the right tool.
Movement efficiency
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Movement efficiency",
"rows": [
{
"field": "<code>movement_efficiency</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is a factor to improve walking on terrain that slows down movement. A value of 1 removes the slowdown.
Movement speed
| ID |
|
|---|---|
| Default |
0.7 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Movement speed",
"rows": [
{
"field": "<code>movement_speed</code>",
"label": "ID"
},
{
"field": "0.7",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
Movement speed is the speed at which entities can move, but this is not the actual speed value in blocks/second. The mob's actual speed in blocks/second is a bit over 20 times this value, but is affected by various conditions, such as the behavior it's following (e.g. idling, attacking or fleeing), being ridden (if a horse), sprinting, being led by a leash, and being under the effect of a Speed or Slowness potion. Baby mobs also have an additional speed multiplier on top of the base value.
| Entity | Default value |
|---|---|
| Random (0.1125 – 0.3375) | |
| 1.2 | |
| 1 | |
| 0.7 | |
| 0.6 | |
| 0.5 | |
| 0.35 | |
| 0.3 + 0.1 × Size | |
| 0.3 | |
| 0.25 | |
| 0.23 | |
| 0.2 | |
| 0.175 | |
| 0.15 | |
| 0.14 | |
| 0.1 | |
| 0.09 | |
| 0.07 | |
| 0.05 |
Oxygen bonus
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1024 |
{
"title": "Oxygen bonus",
"rows": [
{
"field": "<code>oxygen_bonus</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the chance that an entity's Air data tag decreases in any given game tick, while the entity is underwater. The chance is given by 1⁄(oxygen_bonus + 1).
Safe fall distance
| ID |
|
|---|---|
| Default |
3 |
| Minimum |
-1024 |
| Maximum |
1024 |
{
"title": "Safe fall distance",
"rows": [
{
"field": "<code>safe_fall_distance</code>",
"label": "ID"
},
{
"field": "3",
"label": "Default"
},
{
"field": "-1024",
"label": "Minimum"
},
{
"field": "1024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the number of blocks an entity can fall before fall damage starts to be accumulated. It also determines the minimum amount of blocks the entity has to fall to make fallling particles and sounds.
| Entity | Default value |
|---|---|
| 6 | |
| 5 | |
| All other entities | 3 |
Scale
| ID |
|
|---|---|
| Default |
1 |
| Minimum |
0.0625 |
| Maximum |
16 |
{
"title": "Scale",
"rows": [
{
"field": "<code>scale</code>",
"label": "ID"
},
{
"field": "1",
"label": "Default"
},
{
"field": "0.0625",
"label": "Minimum"
},
{
"field": "16",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute multiplies the size of an entity.
Spawn reinforcements
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Spawn reinforcements",
"rows": [
{
"field": "<code>spawn_reinforcements</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the chance for a zombie to spawn another zombie when attacked.
| Entity | Default value |
|---|---|
| Random (0–0.1) | |
| 0[5] |
Sneaking speed
| ID |
|
|---|---|
| Default |
0.3 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Sneaking speed",
"rows": [
{
"field": "<code>sneaking_speed</code>",
"label": "ID"
},
{
"field": "0.3",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the movement speed factor when sneaking or crawling. A factor of 1 means sneaking or crawling is as fast as walking, a factor of 0 means unable to move while sneaking or crawling.
Step height
| ID |
|
|---|---|
| Default |
0.6 |
| Minimum |
0 |
| Maximum |
10 |
{
"title": "Step height",
"rows": [
{
"field": "<code>step_height</code>",
"label": "ID"
},
{
"field": "0.6",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "10",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the maximum number of blocks that an entity can step up without jumping. Sneaking prevents drops from heights that are higher than this attribute.[6] This happens if the height that the player is above a block is equal or less than the attribute.
| Entity | Default value |
|---|---|
| 1.5 | |
| 1 | |
| 0[7] | |
| All other entities | 0.6 |
Submerged mining speed
| ID |
|
|---|---|
| Default |
0.2 |
| Minimum |
0 |
| Maximum |
20 |
{
"title": "Submerged mining speed",
"rows": [
{
"field": "<code>submerged_mining_speed</code>",
"label": "ID"
},
{
"field": "0.2",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "20",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the mining speed factor when underwater. A factor of 1 means mining as fast as on land, a factor of 0 means unable to mine while submerged. This represents only the submersion factor itself; other factors (such as not touching the ground) also apply.
Sweeping damage ratio
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Sweeping damage ratio",
"rows": [
{
"field": "<code>sweeping_damage_ratio</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines how much of the base attack damage gets transferred to secondary targets in a sweep attack. This is in addition to the base attack of the sweep damage itself. A value of 1 means that all of the base attack damage is transferred (sweep damage is attack_damage + 1)
Tempt range
| ID |
|
|---|---|
| Default |
10 |
| Minimum |
0 |
| Maximum |
2024 |
{
"title": "Tempt range",
"rows": [
{
"field": "<code>tempt_range</code>",
"label": "ID"
},
{
"field": "10",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "2024",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the range, in blocks, at which temptable mobs can be tempted.
Water movement efficiency
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
1 |
{
"title": "Water movement efficiency",
"rows": [
{
"field": "<code>water_movement_efficiency</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "1",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute is a factor of movement speed when submerged. A higher value lets entities move faster. This represents only the submersion factor itself; other factors (such as sprinting) also apply.
Waypoint receive range
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
60,000,000 |
{
"title": "Waypoint receive range",
"rows": [
{
"field": "<code>waypoint_receive_range</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "60,000,000",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the maximum distance from the player to a waypoint at which the waypoint is displayed on the locator bar. This attribute has no effect on mobs.
| Entity | Default value |
|---|---|
| 60,000,000 | |
| All other entities | 0 |
Waypoint transmit range
| ID |
|
|---|---|
| Default |
0 |
| Minimum |
0 |
| Maximum |
60,000,000 |
{
"title": "Waypoint transmit range",
"rows": [
{
"field": "<code>waypoint_transmit_range</code>",
"label": "ID"
},
{
"field": "0",
"label": "Default"
},
{
"field": "0",
"label": "Minimum"
},
{
"field": "60,000,000",
"label": "Maximum"
}
],
"invimages": [],
"images": []
}
This attribute determines the distance at which an entity displays as a waypoint on the locator bar.
| Entity | Default value |
|---|---|
| 60,000,000 | |
| All other entities | 0 |
Modifiers
Modifiers increase or decrease the attribute's base value by using certain operations. The resulting value after modification is capped by the attribute's minimum and maximum limits. Similar to attribute names, modifiers have a namespaced identifiers to uniquely identify the modifier.
However, a modifier's ID does not define the modifier's behavior; instead, it is determined by its operation. Modifiers carry an amount to their modification. When attribute modifiers are applied to items, the type parameter is required; this defines which attribute the modifier affects. Modifiers can be added or removed from all living entities using the /attribute command, modifying the entity's NBT data, or using item modifiers via data components.
Operations
Modifier operations dictate how it modifies an attribute base value. There are three operations that exist in the game:[note 1]
| Operation | Description |
|---|---|
| add_value | Adds all of the modifiers' amounts to the base attribute.
For example, applying two add_value modifiers with amounts of 2 and 4, to attribute base of 3:
|
| add_multiplied_base | Multiplies the base attribute by (1 + sum of modifiers' amounts).
For example, applying two add_multiplied_base modifiers with amounts of 2 and 4, to attribute base of 3:
|
| add_multiplied_total | Multiplies the base attribute by (1 + modifiers' amounts) for every modifier.
For example, applying two add_multiplied_total modifiers with amounts of 2 and 4, to attribute base of 3:
|
If multiple attribute modifiers are applied, the game first executes all add_value modifiers, then all add_multiplied_base modifiers, and finally all add_multiplied_total modifiers. The Total value is always carried as the Base for the next set of modifiers.
Vanilla modifiers
As stated before, a modifier's ID can be anything, and this does not affect its behavior. The following are known modifier IDs and values used in vanilla Minecraft. Manually setting vanilla modifiers with the correct ID and attribute overrides the default value.
| Modifier ID | Description and Known Values | Known Attributes Modified |
|---|---|---|
| minecraft:armor.body | Value varies based on the armor of the horse. | armor (Operation add_value; Horses), generic.armor_toughness (Operation add_value; Horses)
|
| minecraft:armor.body | Fixed value of 11.0 for wolves wearing wolf armor. | armor (Operation add_value; Wolves)
|
| minecraft:armor.helmet
minecraft:armor.chestplate minecraft:armor.leggings minecraft:armor.boots |
Value varies based on slot and tier. | armor (Operation add_value; boots, leggings, chestplate, helmet, turtle shell)
|
| minecraft:armor.helmet
minecraft:armor.chestplate minecraft:armor.leggings minecraft:armor.boots |
Value varies based on tier. | armor_toughness (Operation add_value; boots, leggings, chestplate, helmet, turtle shell)
|
| minecraft:armor.helmet
minecraft:armor.chestplate minecraft:armor.leggings minecraft:armor.boots |
Applies knockback resistance similarily to netherite armor. A piece of netherite armor is equivalent to add_value with amount 0.1.
|
knockback_resistance (Operation add_value; boots, leggings, chestplate, helmet)
|
| minecraft:attacking | Fixed value of 0.15 for Endermen and 0.05 for Zombified Piglins; exists only when attacking. | movement_speed (Operation add_value; Endermen, Zombified Piglins)
|
| minecraft:base_attack_damage | Value varies based on tool/weapon and tier. | attack_damage (Operation add_value; tridents, shovels, pickaxes, axes, hoes, maces)
|
| minecraft:base_attack_speed | Value varies based on tool/weapon and tier. | attack_speed (Operation add_value; tridents, shovels, pickaxes, axes, hoes, maces)
|
| minecraft:baby | Fixed value of 0.5 for Zombies and 0.2 for Piglins; exists only for their respective baby variants. | movement_speed (Operation add_multiplied_base; Baby Zombies. Baby villagers)
|
| minecraft:covered | Fixed value of 20.0 for Shulkers. Exists only when fully closed. | armor (Operation add_value; Shulkers)
|
| minecraft:creative_mode_block_range | Fixed value of 0.5 while player is in Creative Mode. | block_interaction_range (Operation add_value; Player)
|
| minecraft:creative_mode_entity_range | Fixed value of 2.0 while player is in Creative Mode. | entity_interaction_range (Operation add_value; Player)
|
| minecraft:drinking | Fixed value of -0.25 for Witches when drinking a potion. | movement_speed (Operation add_value; Witches)
|
| minecraft:effect.speed | Fixed value of 0.2 when under the Speed effect, multiplied by the effect's level (amplifier + 1). | movement_speed (Operation add_multiplied_total; All living entities)
|
| minecraft:effect.slowness | Fixed value of -0.15 when under the Slowness effect, multiplied by the effect's level. | movement_speed (Operation add_multiplied_total; All living entities)
|
| minecraft:effect.haste | Fixed value of 0.1 when under the Haste effect, multiplied by the effect's level. | attack_speed (Operation add_multiplied_total; All living entities)
|
| minecraft:effect.mining_fatigue | Fixed value of -0.1 when under the Mining fatigue effect, multiplied by the effect's level. | attack_speed (Operation add_multiplied_total; All living entities)
|
| minecraft:effect.strength | Fixed value of 3.0 when under the Strength effect, multiplied by the effect's level. | attack_damage (Operation add_value; All living entities)
|
| minecraft:effect.weakness | Fixed value of -4.0 when under the Weakness effect, multiplied by the effect's level. | attack_damage (Operation add_value; All living entities)
|
| minecraft:effect.health_boost | Fixed value of 4.0 when under the Health Boost effect, multiplied by the effect's level. | max_health (Operation add_value; All living entities)
|
| minecraft:effect.luck | Fixed value of 1.0 when under the Luck effect, multiplied by the effect's level. | luck (Operation add_value; All living entities)
|
| minecraft:effect.unluck | Fixed value of -1.0 when under the Unluck effect, multiplied by the effect's level. | luck (Operation add_value; All living entities)
|
| minecraft:effect.jump_boost | Fixed value of 0.1 when under the Jump boost effect, multiplied by the effect's level. | jump_strength (Operation add_value; All living entities)
|
| minecraft:leader_zombie_bonus | Has a (small) random chance of being generated on a zombie when spawned. For Spawn Reinforcements Chance, random number between 0.5 and 0.75. For max_health, random number between 1.0 and 4.0. | spawn_reinforcements (Operation add_value; Zombies), max_health (Operation add_multiplied_total; Zombies)
|
| minecraft:powder_snow | Value varies from 0 to -0.05 based on ticks spent in powder snow. | movement_speed (Operation add_value; all living entities)
|
| minecraft:random_spawn_bonus | Generated upon spawning; a random number from a Gaussian distribution ranging from 0.0 to 0.05. For Zombie Knockback Resistance, another value between 0.0 and 0.05 is also generated. | follow_range (Operation add_multiplied_base; all mobs), Knockback Resistance (Operation add_value; Zombies only)
|
| minecraft:reinforcement_caller_charge | Fixed value of -0.05 created each time a zombie spawns another zombie as reinforcement. | spawn_reinforcements (Operation add_value; Zombies)
|
| minecraft:reinforcement_callee_charge | Fixed value of -0.05 created for each zombie spawned as a reinforcement. | spawn_reinforcements (Operation add_value; Zombies)
|
| minecraft:sprinting | Fixed value of 0.3 used by all mobs (including players) when sprinting. | movement_speed (Operation add_multiplied_total; all living entities)
|
| minecraft:zombie_random_spawn_bonus | Generated upon spawning; a random number between 0.0 and 1.5. | follow_range (Operation add_multiplied_total; Zombies)
|
| None/unknown | Unknown; created when the client reads attribute data sent by the server. | varies |
History
Java Edition
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.6.1 | 13w16a | Added attributes and modifiers. | |||||
| The following attributes existed: "Max Health", "Follow Range", "Knockback Resistance"; furthermore, "Jump Strength" and "Speed" existed as horse-specific attributes. | |||||||
| The only modifiers were both "Random spawn bonus", one used on Zombies to knockback resistance with operation 0, and the other on all mobs to follow range with operation 1. | |||||||
| 13w17a | Added "Spawn Reinforcements Chance" attribute for Zombies. | ||||||
| Added "Zombie reinforcement charge" (to spawn reinforcements charge), "Random zombie-spawn bonus" (to follow range), and "Leader zombie bonus" (to both reinforcements charge and max health). | |||||||
| 13w18a | Replaced "Zombie reinforcement charge" with "Zombie reinforcement caller charge" | ||||||
| 13w21a | Attributes now can be specified in NBT. | ||||||
| Attributes now have IDs and corresponding translation keys. | |||||||
| Modifiers now display on items. | |||||||
| Added "Attack Damage" and made "Speed" generic. | |||||||
| Added "potion.moveSpeed", "potion.moveSlowdown", "potion.damageBoost", and "potion.weakness" modifiers. | |||||||
| Added "Sprinting speed boost", "Fleeing speed bonus", "Attacking speed boost" (for both pigmen and endermen), "Drinking speed penalty", and "Baby speed boost". | |||||||
| Added "Tool modifier" and "Weapon modifier". | |||||||
| 13w23b | Added "potion.healthBoost" modifier. | ||||||
| 1.7.2 | 13w36a | Attributes/modifiers can be added to items or mobs without the use of third-party NBT editing software by adding data tags to the /give and /summon commands. | |||||
| 1.9 | 15w34b | Added attack speed attribute. | |||||
| 15w36d | Added armor attribute. | ||||||
| 15w44b | Added luck attribute. | ||||||
| 1.9.1 | pre1 | Added armorToughness attribute. | |||||
| 1.12 | pre1 | Added flyingSpeed attribute. | |||||
| 1.14 | 18w43a | Added attackKnockback attribute. | |||||
| 1.16 | 20w06a | Knockback resistance is now a scale rather than probability. | |||||
| 20w14a | Items and entities no longer keep unknown attributes. | ||||||
| Names of some attributes have been renamed to meet resource location requirements (i.e., lowercase separated by underscores instead of camel case). | |||||||
Renamed generic.maxHealth to generic.max_health.
| |||||||
Renamed zombie.spawnReinforcements to zombie.spawn_reinforcements.
| |||||||
Renamed horse.jumpStrength to horse.jump_strength.
| |||||||
Renamed generic.followRange to generic.follow_range.
| |||||||
Renamed generic.knockbackResistance to generic.knockback_resistance.
| |||||||
Renamed generic.movementSpeed to generic.movement_speed.
| |||||||
Renamed generic.flyingSpeed to generic.flying_speed.
| |||||||
Renamed generic.attackDamage to generic.attack_damage
| |||||||
Renamed generic.attackKnockback to generic.attack_knockback
| |||||||
Renamed generic.attackSpeed to generic.attack_speed
| |||||||
Renamed generic.armorToughness to generic.armor_toughness. | |||||||
| 20w17a | Added the /attribute command, which can query and change attributes. | ||||||
| 1.18.2 | 22w03a | Knockback resistance no longer gives a 50% chance to ignore all knockback. | |||||
| 1.20.2 | 23w31a | Added the generic.max_absorption attribute. | |||||
| 1.20.5 | 23w51a | Added generic.scale and generic.step_height attributes for all living entities, as well as generic.block_interaction_range and generic.entity_interaction_range attributes for players. | |||||
| 24w03a | Renamed generic.block_interaction_range and generic.entity_interaction_range to player.block_interaction_range and player.entity_interaction_range. | ||||||
| 24w06a | Added generic.gravity, generic.safe_fall_distance, generic.fall_damage_multiplier and player.block_break_speed attributes. | ||||||
Renamed horse.jump_strength to generic.jump_strength. | |||||||
| 1.21 | 24w18a | Added generic.burning_time, generic.explosion_knockback_resistance, player.mining_efficiency, generic.movement_efficiency, generic.oxygen_bonus, player.sneaking_speed, player.submerged_mining_speed, player.sweeping_damage_ratioand generic.water_movement_efficiency attributes. | |||||
generic.attack_knockback attribute now also works for players. | |||||||
| 24w21a | The uuid and name arguments have been replaced with a singular id argument. | ||||||
| 1.21.2 | 24w33a | Added the tempt_range attribute.
| |||||
Removed the generic., player., or zombie. prefixes from all the attributes. Instead of using the resource locations, the argument instead just asks for the name of the attribute. | |||||||
| 1.21.4 | 24w44a | Players can no longer sprint while sneaking or crawling when having the sneaking_speed attribute set to 0.8 or higher.[8] | |||||
| 1.21.6 Experiment | 25w15a | Added waypoint_transmit_range and waypoint_receive_range attributes. | |||||
| 1.21.6 | 25w15a | Added camera_distance attribute. | |||||
| 25w17a | waypoint_transmit_range and waypoint_receive_range are no longer experimental. | ||||||
| Java Edition Combat Tests | |||||||
| 1.14.3 | Added generic.attackReach attribute. | ||||||
| 6 | Renamed generic.attackReach to generic.attack_reach. | ||||||
Bedrock Edition
| Pocket Edition Alpha | |||||||
|---|---|---|---|---|---|---|---|
| v0.12.1 | build 1 | Added attributes. | |||||
Legacy Console Edition
| Legacy Console Edition | |||||||
|---|---|---|---|---|---|---|---|
| Xbox 360 | Xbox One | PS3 | PS4 | PS Vita | Wii U | Switch | |
| TU19 | CU7 | 1.12 | 1.12 | 1.12 | Patch 1 | 1.0.1 | Added attributes. |
| TU36 | CU25 | 1.28 | 1.28 | 1.28 | Patch 7 | Attributes of items are shown above the HUD when switching items in the hotbar if the item has less than 3 enchantments. | |
| TU46 | CU36 | 1.38 | 1.38 | 1.38 | Patch 15 | Added armor and luck attributes. | |
| TU54 | CU44 | 1.52 | 1.52 | 1.52 | Patch 24 | 1.0.4 | Added flying speed attribute.[verify] |
Issues
Issues relating to "Attribute" are maintained on the bug tracker. Issues should be reported and viewed there.
References
- ↑ "Good news for mapmakers: Items can have attribute modifiers. It's possible to make a bow that slows the holder, helm that buffs health, etc" – @Dinnerbone (Nathan Adams) on X (formerly Twitter), May 23, 2013
- ↑ "Equipped as armour or held in hand." – @Dinnerbone (Nathan Adams) on X (formerly Twitter), May 23, 2013
- ↑ MC-138868
- ↑ MC-32578
- ↑ MC-301000
- ↑ MC-268917
- ↑ MC-133544 — resolved as "Works As Intended".
- ↑ MC-278349
| General mechanics | |
|---|---|
| Technical mechanics | |
| Survival |
|
| Combat | |
| Environment |
More |
| Movement | |
| User interface | |
| Visuals | |
| Removed | |
| Unintended | |