Minecraft Wiki
Advertisement

Attributes are a system of buffs/debuffs added in 13w16a.[1] They are hidden properties on mobs and players, and some are specific to certain types of mobs. Attributes also have Modifiers which adjust the strength of their effect. When applied to an item, a Modifier will adjust the corresponding Attribute if the item is held or worn[2][3]. Attributes/Modifiers will eventually be possible with the use of commands[4][5]

Attributes

An individual Attribute controls some property, described by its Name. An Attribute always has a Base value, and may have any number of Modifiers. Attributes also have a default value (used when spawning a mob with an undefined Attribute Base), and hard-coded Minimum and Maximum values. Modifiers act on an Attribute's Base, but the calculated value is always capped by the Minimum and Maximum.

Attributes Available on All Living Entities

These Attributes are found on all mobs, including players.

Attribute Name Description Default Base Minimum Maximum
Max Health / generic.maxHealth The maximum health of this mob; determines the highest Health they may be healed to. 20 0.0 1.7976931348623157E+308
Follow Range / generic.followRange Unknown behavior. Actual value used by most mobs is 16; for Zombies it is 40. 32 0.0 2048
Knockback Resistance / generic.knockbackResistance Resistance to knockback from attacks, explosions, and projectiles. 1.0 is full resistance. 0.0 0.0 1.0
Movement Speed / generic.movementSpeed Speed of movement in some unknown metric. 0.69999998807907104 0.0 1.7976931348623157E+308
generic.attackDamage Damage dealt by attacks, in half-hearts. 2 0.0 1.7976931348623157E+308

Attributes for Horses

These Attributes are only used by Horses.

Attribute Name Description Default Base Minimum Maximum
Jump Strength Horse jump strength in some metric. Metric currently unknown. 0.69999999999999996 0.0 2
Speed Horse speed in some metric. Metric currently unknown. 0.90000000000000002 0.10000000000000001 2

Modifiers

Modifiers act upon the base value of an Attribute, increasing or decreasing it. Note that the resulting value after Modification is capped by the Attribute's Minimum and Maximum. Like Attributes, Modifiers have a Name, however, this name does not define the Modifier's behavior. Instead, a Modifier's behavior is determined by its Operation. Modifiers also carry an Amount to their modification, and a UUID (Universally Unique IDentifier).

Operations

A Modifier's Operation dictates how it modifies an Attribute's Base value. Three operations exist, "+- amount", "+- amount % (additive)", and "+- amount % (multiplicative)"[6]. For convenience, these will be referred to as Operations 0, 1, and 2, as they are in the code and NBT format.

The mathematical behavior is as follows: Operation 0: Increment X by Amount, Operation 1: Increment Y by X * Amount, Operation 2: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount). The game first sets X = Base, then executes all Operation 0 modifiers, then sets Y = X, then executes all Operation 1 modifiers, and finally executes all Operation 2 modifiers.

Vanilla Modifiers

As stated before, a Modifier's Name can be anything, and this will not effect its behavior. The following are only known Modifier names and values used in Vanilla Minecraft.

Modifier Name Known Attributes Modified Description
Random spawn bonus Follow Range (Operation 1; all mobs), Knockback Resistance (Operation 0; Villagers only) Generated upon spawning; a random number from a Gaussian distribution ranging from 0.0 to 0.050000000000000003.

References

Advertisement