Minecraft:Attribute
More actions
|
For the {{{Description}}} of the same name, see [[{{{Destination}}}]]. |
Attributes control certain numeric properties of Minecraft:players, Minecraft:mobs, and Minecraft:armor stands. Every entity has a base value for each of its attributes, and modifiers that determine the final value.
List of attributes
Each attribute is identified with a Minecraft:namespaced identifier, and has a default, minimum, and maximum value.
Most attributes are present on all living entities, but some attributes only apply to specific entity types. Additionally, some entity types have a base value other than the default.
Air Drag Modifier
This attribute determines the air drag an entity experiences.Template:Info neededTemplate:Upcoming
Armor
This attribute determines the number of Minecraft:armor points an entity has.
Armor Toughness
This attribute determines an entity's Minecraft:armor toughness.
Template:Anchor
Attack Damage
This attribute determines the Minecraft:damage dealt by an entity's Minecraft:melee attack. Only the entities listed below have this attribute.
Attack Knockback
This attribute determines additional Minecraft:knockback applied to an entity's Minecraft:melee attack.Template:Info needed
| Entity | Base value |
|---|---|
| Template:EntityLink Template:EntityLink | 1.5 |
| Template:EntityLink Template:EntityLink | 1 |
Attack Speed
Template:Infobox attribute This attribute determines the rate at which a Minecraft:player's attack cooldown recharges. Its value is the number of full-strength attacks per second. Only players have this attribute.
Nameplate Score Distance
Template:Infobox attribute This attribute determines the distance within which a Minecraft:scoreboard objective with a Template:Cd display slot is visible above an entity.Template:Upcoming
Block Break Speed
Template:Infobox attribute This attribute multiplies the speed at which a Minecraft:player breaks blocks. Only players have this attribute.
Block Interaction Range
Template:Infobox attribute This attribute determines the block Minecraft:interaction range for players. Only players have this attribute.
Bounciness
Template:Infobox attribute This attribute determines the restitution of motion an entity is given when landing on the ground.Template:Upcoming
Burning Time
Template:Infobox attribute This attribute multiplies the duration for which an entity should remain on Minecraft:fire after being ignited.
Camera Distance
Template:Infobox attribute
This attribute determines the distance at which the camera is placed away from the player or spectated entity when in a Minecraft: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 | Base value |
|---|---|
| Template:EntityLink Template:EntityLink | 8 |
| Template:EntityLink Template:EntityLink | 16 |
Entity Interaction Range
Template:Infobox attribute This attribute determines the entity Minecraft:interaction range for players.
Explosion Knockback Resistance
Template:Infobox attribute This attribute determines the proportion of knockback from Minecraft:explosions an entity resists. A value of 1 eliminates the knockback.
Fall Damage Multiplier
Template:Infobox attribute This attribute multiplies the amount of Minecraft:fall damage an entity receives.
Flying Speed
Template:Infobox attribute This attribute determines the flying speed of an entity.Template:Info needed Only the entities listed below have this attribute.
| Entity | Base value |
|---|---|
| Template:EntityLink Template:EntityLink | 0.6 |
| Template:EntityLink | 0.1 |
| Template:EntityLink | 0.06 |
| Template:EntityLink | 0.05 |
| Template:EntityLink | 0.4 |
Mob Follow Range
Template:Infobox attribute This attribute determines the range in blocks within which a mob targets players or other mobs to track. Exiting this range causes the mob to cease following the player/mob. Only mobs have this attribute.
Friction Modifier
Template:Infobox attribute This attribute determines the friction experienced by an entity.Template:Info neededTemplate:Upcoming
Gravity
Template:Infobox attribute This attribute determines the gravity affecting an entity in blocks per tick squared.
Jump Strength
Template:Infobox attribute This attribute determines the initial vertical velocity of an entity when they jump, in blocks per tick.
| Entity | Base value |
|---|---|
| Template:EntityLink Template:EntityLink Template:EntityLink | Random (0.4–1.0) |
| Template:EntityLink Template:EntityLink Template:EntityLink Template:EntityLink | 0.5 |
Knockback Resistance
This attribute determines the proportion of horizontal knockback from attacks and projectiles an entity resists. A value of 1 eliminates the knockback. Vertical knockback is not affected. It does not affect Minecraft:explosions.<ref>Template:Bug</ref>
| Entity | Base value |
|---|---|
| Template:EntityLink Template:EntityLink | 1 |
| Template:EntityLink | 0.75 |
| Template:EntityLink Template:EntityLink | 0.6 |
| Template:EntityLink Template:EntityLink | 0.6 |
Luck
This attribute affects the results of Minecraft:loot tables, with a higher attribute value increasing the amount and quality of results.
The number of rolls is increased by the pools "bonus rolls"-value times this attributes value, rounded down, and the weight of each entry is increased by its quality times this attributes value, also rounded down.
Only players have this attribute.
Max Absorption
Template:Infobox attribute This attribute determines an entity's maximum Minecraft:absorption.
Max Health
Template:Infobox attribute This attribute determines an entity's maximum Minecraft:health. It determines the highest health they may be healed to.
Mining Efficiency
Template:Infobox attribute This attribute increases the speed at which a Minecraft:player breaks blocks. Only players have this attribute.
Movement Efficiency
Template:Infobox attribute This attribute is a factor to improve walking on terrain that slows down movement, such as Minecraft:soul sand. A value of 1 removes the slowdown.
Speed
Template:Infobox attribute This attribute determines the speed at which an entity moves. It represents a multiplier for acceleration per tick. A mob's actual speed in blocks/second is approximately 43 times this value (see Minecraft:Entity#Formulas.)
Name Tag Distance
Template:Infobox attribute This attribute determines the distance within which an entity's Minecraft:custom name is visible.Template:Upcoming
Oxygen Bonus
Template:Infobox attribute This attribute determines the chance that an entity's remaining air decreases while underwater in any given game tick. The chance is given by Template:Frac.
Safe Fall Distance
Template:Infobox attribute This attribute determines the distance in blocks an entity can fall before Minecraft:fall damage starts to accumulate.
Scale
Template:Infobox attribute This attribute multiplies an entity's size and Minecraft:hitbox dimensions.
Sneaking Speed
Template:Infobox attribute This attribute multiplies a player's movement speed when Minecraft:sneaking or Minecraft:crawling. Only players have this attribute.
Zombie Reinforcements
Template:Infobox attribute This attribute determines the chance for a Minecraft:zombie to spawn another zombie when attacked. Only the entities listed below have this attribute.
| Entity | Base value |
|---|---|
| Template:EntityLink Template:EntityLink Template:EntityLink Template:EntityLink | Random (0 – 0.1) |
| Template:EntityLink | 0<ref>Template:Bug</ref> |
Step Height
Template:Infobox attribute This attribute determines the maximum number of blocks that an entity can step up without jumping. Minecraft:Sneaking prevents drops from heights that are higher than this value.<ref>Template:Bug</ref>
Submerged Mining Speed
Template:Infobox attribute This attribute multiplies a player's mining speed when underwater. Only players have this attribute.
Sweeping Damage Ratio
Template:Infobox attribute This attribute determines the proportion of the base attack damage dealt to secondary targets when a player performs a Minecraft:sweep attack. This is in addition to the base damage of the sweep damage itself. Only players have this attribute.
Mob Tempt Range
This attribute determines the range in blocks in which a mob can be tempted, following a player holding a specific item.
Water Movement Efficiency
Template:Infobox attribute This attribute determines movement speed and drag when submerged.Template:Info needed
Waypoint Receive Range
Template:Infobox attribute This attribute determines the maximum distance from a player to a waypoint at which the waypoint is displayed on the Minecraft:locator bar. Only players have this attribute.
| Entity | Base value |
|---|---|
| Template:EntityLink | 60,000,000 |
Waypoint Transmit Range
Template:Infobox attribute This attribute determines the distance at which an entity displays as a waypoint on the Minecraft:locator bar.
| Entity | Base value |
|---|---|
| Template:EntityLink | 60,000,000 |
Modifiers
Attribute modifiers are persistent increases or decreases to an attribute's base value by preset operations.
Each modifier has a Minecraft:namespaced identifier to uniquely identify it. Modifiers affect exactly one attribute, increasing or decreasing its value depending on the modifier's operation and value. The resulting value after modification is capped by the attribute's minimum and maximum limits.
Operations
A modifier may perform one of three possible operations:
| Operation | Description |
|---|---|
| add_value | Adds all of the modifiers' amounts to the base attribute.
<math>\text{Total} = \text{Base} + \text{Amount}_1 + \text{Amount}_2 + \ldots + \text{Amount}_n</math> For example, applying two add_value modifiers with amounts of 2 and 4, to attribute base of 3: <math>\text{Total} = 3 + 2 + 4 = 9</math> |
| add_multiplied_base | Multiplies the base attribute by (1 + sum of modifiers' amounts).
<math>\text{Total} = \text{Base} \times (1 + \text{Amount}_1 + \text{Amount}_2 + \ldots + \text{Amount}_n)</math>Template:Note For example, applying two add_multiplied_base modifiers with amounts of 2 and 4, to attribute base of 3: <math>\text{Total} = 3 \times (1 + 2 + 4) = 3 \times 7 = 21</math> |
| add_multiplied_total | Multiplies the base attribute by (1 + modifiers' amounts) for every modifier.
<math>\text{Total} = \text{Base} \times (1 + \text{Amount}_1) \times (1 + \text{Amount}_2) \times \ldots \times (1 + \text{Amount}_n)</math> For example, applying two add_multiplied_total modifiers with amounts of 2 and 4, to attribute base of 3: <math>\text{Total} = 3 \times (1 + 2) \times (1 + 4) = 3 \times 3 \times 5 = 45</math> |
If multiple modifiers are applied to an attribute, the game first executes all Template:Cd modifiers, then all Template:Cd modifiers, and finally all Template:Cd modifiers. The Total value is always carried as the Base for the next set of modifiers.
The final value is clamped to fit the attribute's minimum and maximum value range.
<references group="note"/>
Applying modifiers
Various systems in the game add and remove modifiers.
Commands
The Template:Command command can add or remove specific modifiers, including custom ones. Except for players, it is also possible add, remove and custom with Template:Cmd.
Items
The [[Minecraft:Data_component_format#attribute_modifiers|Template:Cd item component]] defines modifiers that are automatically added to an entity when the item is equipped in a certain slot, and removed when it is removed.
All vanilla weapons and armor use this component to add and remove modifiers with the following IDs:
Enchantments
Enchantment attribute effects define modifiers that are automatically added to an entity when the enchanted item is equipped in a certain slot, and removed when it is removed.
Some vanilla enchantments use this effect to add and remove modifiers with the following IDs. The listed IDs are appended with Template:Cd followed by the name of the slot the enchantment is active in.
| Modifier ID | Attribute | Minecraft:Level-based value | Operation | Enchantment |
|---|---|---|---|---|
| Template:Cd | Template:Cd |
type: Template:Cd, |
add_multiplied_total | Minecraft:Aqua Affinity |
| Template:Cd | Template:Cd |
type: Template:Cd, |
add_value | Minecraft:Blast Protection |
| Template:Cd | Template:Cd |
type: Template:Cd, |
add_value | Minecraft:Depth Strider |
| Template:Cd | Template:Cd |
type: Template:Cd, |
add_value | Minecraft:Efficiency |
| Template:Cd | Template:Cd | type: Template:Cd, base: -0.15, |
add_multiplied_base | Minecraft:Fire Protection |
| Template:Cd | Template:Cd | type: Template:Cd, base: 1.0, |
add_value | Minecraft:Respiration |
| Template:Cd | Template:Cd | type: Template:Cd, base: 0.0405, |
add_value | Minecraft:Soul Speed |
| Template:Cd | 1.0 | add_value | ||
| Template:Cd | Template:Cd | add_value | Minecraft:Sweeping Edge | |
| Template:Cd | Template:Cd |
type: Template:Cd, |
add_value | Minecraft:Swift Sneak |
Effects
Some Minecraft:status effects apply modifiers when the effect is applied, and remove them when the effect runs out. The final value of the added attribute is multiplied by Minecraft:effect potency (in other words, multiplied by Template:Cd).
| Modifier ID | Attribute | Value | Operation | Effect |
|---|---|---|---|---|
| Template:Cd | Template:Cd | 0.2 | add_multiplied_total | Template:EffectLink |
| Template:Cd | Template:Cd | -0.15 | add_multiplied_total | Template:EffectLink |
| Template:Cd | Template:Cd | 0.1 | add_multiplied_total | Template:EffectLink |
| Template:Cd | Template:Cd | -0.1 | add_multiplied_total | Template:EffectLink |
| Template:Cd | Template:Cd | 3.0 | add_value | Template:EffectLink |
| Template:Cd | Template:Cd | -4.0 | add_value | Template:EffectLink |
| Template:Cd | Template:Cd | 1.0 | add_value | Template:EffectLink |
| Template:Cd | Template:Cd | -1.0 | add_multiplied_total | Template:EffectLink |
| Template:Cd | Template:Cd | 4.0 | add_value | Template:EffectLink |
| Template:Cd | Template:Cd | 4.0 | add_value | Template:EffectLink |
| Template:Cd | Template:Cd | 1.0 | add_value | Template:EffectLink |
| Template:Cd | Template:Cd | -1.0 | add_value | Template:EffectLink |
Sulfur Cube Archetypes
Template:Missing information Minecraft:Sulfur cube archetype definitions define modifiers that are automatically added to a Minecraft:sulfur cube when one of the specified items is given to it, and removed when it is removed.
See Minecraft:sulfur cube archetype for the values.
The vanilla archetypes add and remove modifiers with the following IDs:
Hardcoded
Other parts of the game add and remove additional modifiers. In this table, every mention of "zombies" represents the class Template:Jcp, that is, the entities: Minecraft:zombie, Minecraft:drowned, Minecraft:husk, Minecraft:zombie villager, and Minecraft:zombified piglin.
| Modifier ID | Attribute | Value | Operation | Details |
|---|---|---|---|---|
| Template:Cd | Template:Cd | Template:Cd | add_value | Applied randomly to all mobs when they spawn. |
| Template:Cd | Template:Cd | Template:Cd | add_value | Applied randomly to all Minecraft:zombies when they spawn. |
| Template:Cd | Template:Cd | Template:Cd | add_multiplied_total | Applied randomly to some Minecraft:zombies when they spawn. Only applies if greater than 1. |
| Template:Cd | Template:Cd | Template:Cd | add_value | Applied randomly to some Minecraft:zombies to turn them into "leaders". |
| Template:Cd | Template:Cd | add_multiplied_total | ||
| Template:Cd | Template:Cd | Template:Cd | add_value | Applied to a Minecraft:zombie when it successfully spawns a reinforcement. The Template:Cd is the value of the modifier previously, or Template:Cd if it does not exist. |
| Template:Cd | Template:Cd | -0.05 | add_value | Applied to Minecraft:zombie reinforcements when they spawn. |
| Template:Cd | Template:Cd | Template:EntityLink: 0.5 Template:EntityLink: 0.2 |
add_multiplied_base | Applied to Minecraft:zombies and Minecraft:piglins as babies, and removed when they are not babies. |
| Template:Cd | Template:Cd | Template:EntityLink: 0.15 Template:EntityLink: 0.05 |
add_value | Applied to Minecraft:endermen when they acquire a target, and removed when they lose it. Applied to adult Minecraft:zombified piglins when they get angry, and removed when they stop being angry. |
| Template:Cd | Template:Cd | 20.0 | add_value | Applied to Minecraft:shulkers when their shell fully closes, and removed when it opens. |
| Template:Cd | Template:Cd | 0.5 | add_value | Applied to Minecraft:players when they enter Minecraft:creative mode, and removed when leaving creative mode. |
| Template:Cd | Template:Cd | 2.0 | add_value | Applied to Minecraft:players when they enter Minecraft:creative mode, and removed when leaving creative mode. |
| Template:Cd | Template:Cd | -0.25 | add_value | Applied to Minecraft:witches when they start drinking a Minecraft:potion, and removed when they finish drinking it. |
| Template:Cd | Template:Cd | Template:Cd | add_value | Applied to all Minecraft:living entities while inside Minecraft:powder snow, and removed when the frost effect wears off. The Template:Cd is the float Template:Cd. |
| Template:Cd | Template:Cd | 0.3 | add_multiplied_total | Applied to all living entities when they start Minecraft:sprinting, and removed when they stop. |
| Template:Cd | Template:Cd | -1.0 | add_multiplied_total | Applied to Minecraft:players when they start Minecraft:sneaking, and removed when they stop. |
| Template:Cd | Template:Cd | 5.0 | add_value | Applied to Minecraft:rabbits when they become the killer bunny, and removed when they become a different variant. |
| Template:Cd | Template:Cd | -0.34 | add_multiplied_base | Applied to Minecraft:striders when they become cold outside of Minecraft:lava, and removed when they return to lava. |
History
Java Edition
Bedrock Edition
Legacy Console Edition
Issues
References
Minecraft:de:Attribut Minecraft:es:Atributo Minecraft:fr:Attribut Minecraft:ja:属性 Minecraft:ko:속성 Minecraft:pl:Atrybuty Minecraft:pt:Atributo Minecraft:zh:属性