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.jumpStrength Horse jump strength in some metric. Metric currently unknown. 0.69999999999999996 0.0 2

Attributes for Zombies

These Attributes are only used by Zombies.

Attribute Name Description Default Base Minimum Maximum
Spawn Reinforcements Chance / zombie.spawnReinforcements Chance that a zombie will spawn another zombie when attacked. 0.0 0.0 1.0

Properties of Unknown Attributes

When the game finds an Attribute with an unrecognized name, it applies these properties to it.

Attribute Name Description Default Base Minimum Maximum
Any non-Vanilla Attribute name Unknown. 0.0 2.2250738585072014E-308 1.7976931348623157E+308

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 (do not add modifiers to this table if you find them in custom maps, as map makers may create their own custom modifiers). Note that some UUIDs are generated on-the-fly, while others are represented as fixed strings in the code - these have been listed as well. Do not add UUIDs to this table for modifiers where they are not listed - if a UUID is not listed, this means that it is different every time the modifier is created!

Modifier Name Description and Known Values Known Attributes Modified
Random spawn bonus Generated upon spawning; a random number from a Gaussian distribution ranging from 0.0 to 0.050000000000000003. For Zombie Knockback Resistance, another value between 0.0 and 0.05000000074505806 is also generated. Follow Range (Operation 1; all mobs), Knockback Resistance (Operation 0; Villagers and Zombies only)
Tool modifier Value varies based on tool. generic.attackDamage (Operation 0; all tools; UUID CB3F55D3-645C-4F38-A497-9C13A33DB5CF)
Weapon modifier Value varies based on weapon. generic.attackDamage (Operation 0; all tools; UUID CB3F55D3-645C-4F38-A497-9C13A33DB5CF (same UUID as Tool modifier))
Sprinting speed boost Fixed value of 0.30000001192092896 used by all mobs (including players) when sprinting. Movement Speed (Operation 1; all living entities; UUID 662A6B8D-DA3E-4C1C-8813-96EA6097278D)
Fleeing speed boost Fixed value of 2 used by all passive mobs when fleeing. Movement Speed (Operation 2; all passive mobs; UUID E199AD21-BA8A-4C53-8D13-6182D5C69D3A)
Attacking speed boost Fixed value of 6.1999998092651367 for Endermen and 0.45000000000000001 for Zombie Pigmen; exists only when attacking. Movement Speed (Operation 0; Endermen - UUID 020E0DFB-87AE-4653-9556-831010E291A0, Zombie Pigmen - UUID 49455A49-7EC5-45BA-B886-3B90B23A1718)
Baby speed boost Fixed value of 0.5; exists only for baby Zombies and baby Zombie Villagers. Movement Speed (Operation 0; Baby Zombies; UUID B9766B59-9566-4402-BC1F-2EE2A276D836)
Drinking speed penalty Fixed value of -0.25 for Witches when drinking a potion. Movement Speed (Operation 0; Witches; UUID 5CD17E52-A79A-43D3-A529-90FDE04B181E)
Random zombie-spawn bonus Generated upon spawning; a random number between 0.0 and 1.5. Follow Range (Operation 2; Zombies)
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 Chance (Operation 0; Zombies), Max Health (Operation 2; Zombies)
Zombie reinforcement caller charge Fixed value of -0.05000000074505806 created each time a zombie spawns another zombie as reinforcement. Spawn Reinforcements Chance (Operation 0; Zombies)
Zombie reinforcement callee charge Fixed value of -0.05000000074505806 created for each zombie spawned as a reinforcement. Spawn Reinforcements Chance (Operation 0; Zombies)
potion.moveSpeed Fixed value of 0.20000000298023224 when under the Speed effect. Movement Speed (Operation 2; All living entities; UUID 91AEAA56-376B-4498-935B-2F7F68070635)
potion.moveSlowdown Fixed value of -0.15000000596046448 when under the Slowness effect. Movement Speed (Operation 2; All living entities; UUID 7107DE5E-7CE8-4030-940E-514C1F160890)
potion.damageBoost Fixed value of 3 when under the Strength effect. generic.attackDamage (Operation 0; All living entities; UUID 648D7064-6A60-4F59-8ABE-C2C23A6DD7A9)
potion.weakness Fixed value of 2 when under the Weakness effect. generic.attackDamage (Operation 0; All living entities; UUID 22653B89-116E-49DC-9B6B-9971489B5BE5)

References

Advertisement