Minecraft:Attribute: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
{{exclusive|java}} | {{exclusive|java}} | ||
'''Attributes''' control certain numeric properties of [[Minecraft:player]]s, [[Minecraft:mob]]s, and [[Minecraft:armor stand]]s. Every entity has a base value for each of its attributes, and [[#modifiers|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. | |||
{{ | {{-}}{{anchor|air_drag_modifier}} | ||
=== Air Drag Modifier === | |||
{{Infobox attribute | |||
| title = Air Drag Modifier | |||
| id = air_drag_modifier | |||
| default = 1 | |||
| min = 0 | |||
| max = 2048 | |||
}} | |||
=== | |||
This attribute determines the air drag an entity experiences.{{info needed}}{{upcoming|java 26.2}} | |||
{{-}}{{anchor|armor}} | {{-}}{{anchor|armor}} | ||
=== Armor === | === Armor === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Armor | |||
| id = armor | | id = armor | ||
| template = armor | | template = armor | ||
| Line 44: | Line 32: | ||
}} | }} | ||
This attribute | This attribute determines the number of [[Minecraft:armor points]] an entity has. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Killer Bunny}} | | {{EntityLink|Killer Bunny}} | ||
| Line 54: | Line 42: | ||
| {{armor|4}} | | {{armor|4}} | ||
|- | |- | ||
| {{EntityLink|Zombie}} | | {{EntityLink|Zombie}} {{EntityLink|Husk}} {{EntityLink|Drowned}} {{EntityLink|Zombie Villager}} {{EntityLink|Zombified Piglin}} | ||
| {{armor|2}} | | {{armor|2}} | ||
|} | |} | ||
{{-}}{{anchor|armor_toughness}} | {{-}}{{anchor|armor_toughness}} | ||
=== Armor | === Armor Toughness === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Armor Toughness | |||
| id = armor_toughness | | id = armor_toughness | ||
| default = 0 | | default = 0 | ||
| Line 70: | Line 56: | ||
}} | }} | ||
This attribute | This attribute determines an entity's [[Minecraft:armor toughness]]. | ||
{{-}}{{anchor|attack_damage}} | {{-}}{{anchor|attack_damage}} | ||
=== Attack | === Attack Damage === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Attack Damage | |||
| id = attack_damage | | id = attack_damage | ||
| template = hp | | template = hp | ||
| Line 82: | Line 69: | ||
}} | }} | ||
This attribute | This attribute determines the [[Minecraft:damage]] dealt by an entity's [[Minecraft:melee attack]]. Only the entities listed below have this attribute. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Giant}} || {{hp|50}} | | {{EntityLink|Giant}} || {{hp|50}} | ||
| Line 99: | Line 86: | ||
| {{EntityLink|Elder Guardian}} || {{hp|8}} | | {{EntityLink|Elder Guardian}} || {{hp|8}} | ||
|- | |- | ||
| {{EntityLink|Enderman}} | | {{EntityLink|Enderman}} {{EntityLink|Piglin Brute}} || {{hp|7}} | ||
|- | |- | ||
| {{EntityLink|Blaze}} | | {{EntityLink|Blaze}} {{EntityLink|Guardian}} {{EntityLink|Hoglin}} {{EntityLink|Panda}} {{EntityLink|Polar Bear}} {{EntityLink|Zoglin}} | ||
| {{hp|6}} | | {{hp|6}} | ||
|- | |- | ||
| {{EntityLink|Piglin}} | | {{EntityLink|Piglin}} {{EntityLink|Pillager}} {{EntityLink|Vindicator}} {{EntityLink|Zombified Piglin}} | ||
| {{hp|5}} | | {{hp|5}} | ||
|- | |- | ||
| {{EntityLink|Vex}} || {{hp|4}} | | {{EntityLink|Vex}} {{EntityLink|Wolf}} {{EntityLink|Wither Skeleton}} || {{hp|4}} | ||
|- | |- | ||
| {{EntityLink|Cat}} | | {{EntityLink|Cat}} {{EntityLink|Dolphin}} {{EntityLink|Drowned}} {{EntityLink|Husk}} {{EntityLink|Ocelot}} {{EntityLink|Zombie}} {{EntityLink|Zombie Villager}} {{EntityLink|Nautilus}} {{EntityLink|Zombie Nautilus}} {{EntityLink|Parrot}} {{EntityLink|Rabbit}} {{EntityLink|Breeze}} {{EntityLink|Creaking}} | ||
| {{hp|3}} | | {{hp|3}} | ||
|- | |- | ||
| {{EntityLink|Silverfish}} | | {{EntityLink|Allay}} {{EntityLink|Axolotl}} {{EntityLink|Bee}} {{EntityLink|Fox}} {{EntityLink|Goat}} {{EntityLink|Endermite}} {{EntityLink|Creeper}} {{EntityLink|Witch}} {{EntityLink|Evoker}} {{EntityLink|Illusioner}} {{EntityLink|Skeleton}} {{EntityLink|Bogged}} {{EntityLink|Parched}} {{EntityLink|Spider}} {{EntityLink|Cave Spider}} | ||
| {{hp|2}} | |||
|- | |||
| {{EntityLink|Player}} {{EntityLink|Silverfish}} {{EntityLink|Baby Goat}} | |||
| {{hp|1}} | | {{hp|1}} | ||
|- | |- | ||
| {{EntityLink| | | {{EntityLink|Baby Hoglin}} {{EntityLink|Baby Zoglin}} | ||
| {{hp|0}} | | {{hp|0.5}} | ||
|- | |- | ||
| '' | | {{EntityLink|Phantom}} | ||
| {{hp|6}} + ''Size'' | |||
|- | |- | ||
| | | {{EntityLink|Slime}} {{EntityLink|Magma Cube}} | ||
| {{hp| | | {{hp|1}} × ''Size'' | ||
|} | |} | ||
{{-}}{{anchor|attack_knockback}} | {{-}}{{anchor|attack_knockback}} | ||
=== Attack | === Attack Knockback === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Attack Knockback | |||
| id = attack_knockback | | id = attack_knockback | ||
| default = 0 | | default = 0 | ||
| Line 135: | Line 126: | ||
}} | }} | ||
This attribute | This attribute determines additional [[Minecraft:knockback]] applied to an entity's [[Minecraft:melee attack]].{{info needed|in which unit?}} | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Ravager}} | | {{EntityLink|Ravager}} {{EntityLink|Warden}} | ||
| 1.5 | | 1.5 | ||
|- | |- | ||
| {{EntityLink|Hoglin}} | | {{EntityLink|Hoglin}} {{EntityLink|Zoglin}} | ||
| 1 | | 1 | ||
|} | |} | ||
{{-}}{{anchor| | {{-}}{{anchor|attack_speed}} | ||
=== Attack Speed === | |||
=== Attack | |||
{{Infobox attribute | {{Infobox attribute | ||
| id = | | title = Attack Speed | ||
| default = | | id = attack_speed | ||
| default = 4 | |||
| min = 0 | | min = 0 | ||
| max = | | max = 1024 | ||
}} | }} | ||
This attribute determines the rate at which a [[Minecraft:player]]'s [[Minecraft:Melee attack#Attack cooldown|attack cooldown]] recharges. Its value is the number of full-strength attacks per second. Only players have this attribute. | |||
This attribute determines the | |||
{{-}}{{anchor| | {{-}}{{anchor|below_name_distance}} | ||
=== | === Nameplate Score Distance === | ||
{{Infobox attribute | {{Infobox attribute | ||
| id = | | title = Nameplate Score Distance | ||
| default = | | id = below_name_distance | ||
| default = 10 | |||
| min = 0 | | min = 0 | ||
| max = | | max = 512 | ||
}} | }} | ||
This attribute determines | This attribute determines the distance within which a [[Minecraft:scoreboard]] objective with a {{cd|below_name}} display slot is visible above an entity.{{upcoming|java 26.2}} | ||
{{-}}{{anchor|block_break_speed}} | {{-}}{{anchor|block_break_speed}} | ||
=== Block | |||
=== Block Break Speed === | |||
{{Infobox attribute | {{Infobox attribute | ||
| title = Block Break Speed | |||
| id = block_break_speed | | id = block_break_speed | ||
| default = 1 | | default = 1 | ||
| Line 181: | Line 170: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute | This attribute multiplies the speed at which a [[Minecraft:player]] [[Minecraft:Breaking|breaks blocks]]. Only players have this attribute. | ||
{{-}}{{anchor|block_interaction_range}} | {{-}}{{anchor|block_interaction_range}} | ||
=== Block | === Block Interaction Range === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Block Interaction Range | |||
| id = block_interaction_range | | id = block_interaction_range | ||
| default = 4.5 | | default = 4.5 | ||
| Line 191: | Line 181: | ||
| max = 64 | | max = 64 | ||
}} | }} | ||
This attribute determines the block [[Minecraft:interaction range]] for players | This attribute determines the block [[Minecraft:interaction range]] for players. Only players have this attribute. | ||
{{-}}{{anchor|bounciness}} | |||
=== Bounciness === | |||
{{Infobox attribute | |||
| title = Bounciness | |||
| id = bounciness | |||
| default = 0 | |||
| min = 0 | |||
| max = 1 | |||
}} | |||
This attribute determines the restitution of motion an entity is given when landing on the ground.{{upcoming|java 26.2}} | |||
{{-}}{{anchor|burning_time}} | {{-}}{{anchor|burning_time}} | ||
=== Burning | === Burning Time === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Burning Time | |||
| id = burning_time | | id = burning_time | ||
| default = 1 | | default = 1 | ||
| Line 203: | Line 203: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute | This attribute multiplies the duration for which an entity should remain on [[Minecraft:fire]] after being ignited. | ||
{{-}}{{anchor|camera_distance}} | {{-}}{{anchor|camera_distance}} | ||
=== Camera | === Camera Distance === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Camera Distance | |||
| id = camera_distance | | id = camera_distance | ||
| default = 4 | | default = 4 | ||
| Line 213: | Line 214: | ||
| max = 32 | | max = 32 | ||
}} | }} | ||
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 <code>[[#scale|scale]]</code> attribute to get a final target camera distance. If the entity being ridden has a larger <code>camera_distance</code> attribute, that distance will be used. | This attribute determines the distance at which the camera is placed away from the player or [[Minecraft:Spectator mode#Mob view|spectated]] entity when in a [[Minecraft:third-person view]]. This distance is multiplied by the <code>[[#scale|scale]]</code> attribute to get a final target camera distance. If the entity being ridden has a larger <code>camera_distance</code> attribute, that distance will be used. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Ghast}} | | {{EntityLink|Ghast}} {{EntityLink|Happy Ghast}} | ||
| 8 | | 8 | ||
|- | |- | ||
| {{EntityLink|Giant}} | | {{EntityLink|Giant}} {{EntityLink|Ender Dragon}} | ||
| 16 | | 16 | ||
|} | |} | ||
{{-}}{{anchor|entity_interaction_range}} | {{-}}{{anchor|entity_interaction_range}} | ||
=== Entity | === Entity Interaction Range === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Entity Interaction Range | |||
| id = entity_interaction_range | | id = entity_interaction_range | ||
| default = 3 | | default = 3 | ||
| Line 236: | Line 235: | ||
| max = 64 | | max = 64 | ||
}} | }} | ||
This attribute determines the entity [[Minecraft:interaction range]] for players | This attribute determines the entity [[Minecraft:interaction range]] for players. | ||
{{-}}{{anchor|explosion_knockback_resistance}} | {{-}}{{anchor|explosion_knockback_resistance}} | ||
=== Explosion | === Explosion Knockback Resistance === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Explosion Knockback Resistance | |||
| id = explosion_knockback_resistance | | id = explosion_knockback_resistance | ||
| default = 0 | | default = 0 | ||
| Line 248: | Line 246: | ||
| max = 1 | | max = 1 | ||
}} | }} | ||
This attribute | This attribute determines the proportion of knockback from [[Minecraft:explosion]]s an entity resists. A value of 1 eliminates the knockback. | ||
{{-}}{{anchor|fall_damage_multiplier}} | {{-}}{{anchor|fall_damage_multiplier}} | ||
=== Fall | === Fall Damage Multiplier === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Fall Damage Multiplier | |||
| id = fall_damage_multiplier | | id = fall_damage_multiplier | ||
| default = 1 | | default = 1 | ||
| Line 258: | Line 257: | ||
| max = 100 | | max = 100 | ||
}} | }} | ||
This attribute | This attribute multiplies the amount of [[Minecraft:fall damage]] an entity receives. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Camel}} | | {{EntityLink|Camel}} {{EntityLink|Donkey}} {{EntityLink|Horse}} {{EntityLink|Llama}} {{EntityLink|Mule}} {{EntityLink|Skeleton Horse}} {{EntityLink|Trader Llama}} {{EntityLink|Zombie Horse}} {{EntityLink|Camel Husk}} | ||
| 0.5 | | 0.5 | ||
|} | |} | ||
{{-}}{{anchor|flying_speed}} | {{-}}{{anchor|flying_speed}} | ||
=== Flying | === Flying Speed === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Flying Speed | |||
| id = flying_speed | | id = flying_speed | ||
| default = 0.4 | | default = 0.4 | ||
| Line 277: | Line 275: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute | This attribute determines the flying speed of an entity.{{info needed}} Only the entities listed below have this attribute. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Bee}} | | {{EntityLink|Bee}} {{EntityLink|Wither}} | ||
| 0.6 | | 0.6 | ||
|- | |- | ||
| {{EntityLink|Allay}} || 0.1 | | {{EntityLink|Allay}} || 0.1 | ||
|- | |||
| {{EntityLink|Ghast}} || 0.06 | |||
|- | |- | ||
| {{EntityLink|Happy Ghast}} || 0.05 | | {{EntityLink|Happy Ghast}} || 0.05 | ||
|- | |- | ||
| | | {{EntityLink|Parrot}} || 0.4 | ||
|} | |} | ||
{{-}}{{anchor|follow_range}} | {{-}}{{anchor|follow_range}} | ||
=== Follow | === Mob Follow Range === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Mob Follow Range | |||
| id = follow_range | | id = follow_range | ||
| default = 32 | | default = 32 | ||
| Line 300: | Line 301: | ||
| max = 2048 | | max = 2048 | ||
}} | }} | ||
This attribute determines the range in blocks within which a mob | 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. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Ghast}} || 100 | | {{EntityLink|Ghast}} || 100 | ||
| Line 309: | Line 310: | ||
| {{EntityLink|Enderman}} || 64 | | {{EntityLink|Enderman}} || 64 | ||
|- | |- | ||
| {{EntityLink|Allay}} | | {{EntityLink|Allay}} {{EntityLink|Bee}} {{EntityLink|Blaze}} {{EntityLink|Villager}} | ||
| 48 | | 48 | ||
|- | |- | ||
| {{EntityLink|Llama}} | | {{EntityLink|Llama}} {{EntityLink|Wither}} | ||
| 40 | | 40 | ||
|- | |- | ||
| {{EntityLink|Zombie}} | | {{EntityLink|Zombie}} {{EntityLink|Husk}} {{EntityLink|Drowned}} {{EntityLink|Zombie Villager}} {{EntityLink|Zombified Piglin}} | ||
| 35 | | 35 | ||
|- | |- | ||
| {{EntityLink|Fox}} | | {{EntityLink|Fox}} {{EntityLink|Pillager}} {{EntityLink|Ravager}} {{EntityLink|Creaking}} | ||
| 32 | | 32 | ||
|- | |- | ||
| {{EntityLink|Breeze}} || 24 | | {{EntityLink|Breeze}} {{EntityLink|Warden}} || 24 | ||
|- | |- | ||
| {{EntityLink|Polar Bear}} || 20 | | {{EntityLink|Polar Bear}} || 20 | ||
| Line 327: | Line 328: | ||
| {{EntityLink|Illusioner}} || 18 | | {{EntityLink|Illusioner}} || 18 | ||
|- | |- | ||
| {{EntityLink|Evoker}} | | {{EntityLink|Evoker}} {{EntityLink|Vindicator}} {{EntityLink|Piglin Brute}} | ||
| 12 | | 12 | ||
|- | |- | ||
| ''All other | | ''All other mobs'' || 16 | ||
|} | |} | ||
{{-}}{{anchor|friction_modifier}} | |||
=== Friction Modifier === | |||
{{Infobox attribute | |||
| title = Friction Modifier | |||
| id = friction_modifier | |||
| default = 1 | |||
| min = 0 | |||
| max = 2048 | |||
}} | |||
This attribute determines the friction experienced by an entity.{{info needed}}{{upcoming|java 26.2}} | |||
{{-}}{{anchor|gravity}} | {{-}}{{anchor|gravity}} | ||
=== Gravity === | === Gravity === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Gravity | |||
| id = gravity | | id = gravity | ||
| default = 0.08 | | default = 0.08 | ||
| Line 344: | Line 357: | ||
{{-}}{{anchor|jump_strength}} | {{-}}{{anchor|jump_strength}} | ||
=== Jump | === Jump Strength === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Jump Strength | |||
| id = jump_strength | | id = jump_strength | ||
| default = 0.42 | | default = 0.42 | ||
| min = 0 | | min = 0 | ||
| max = 32 | | max = 32 | ||
}} | }} | ||
This attribute determines the initial vertical velocity of an entity when they jump, in blocks per tick. | This attribute determines the initial vertical velocity of an entity when they jump, in blocks per tick. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Horse}} | | {{EntityLink|Horse}} {{EntityLink|Skeleton Horse}} {{EntityLink|Zombie Horse}} | ||
| Random<br>(0.4–1.0) | | Random<br>(0.4–1.0) | ||
|- | |- | ||
| {{EntityLink|Donkey}} | | {{EntityLink|Donkey}} {{EntityLink|Mule}} {{EntityLink|Llama}} {{EntityLink|Trader Llama}} | ||
| 0.5 | | 0.5 | ||
|} | |} | ||
{{-}}{{anchor|knockback_resistance}} | {{-}}{{anchor|knockback_resistance}} | ||
=== Knockback | === Knockback Resistance === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Knockback Resistance | |||
| id = knockback_resistance | | id = knockback_resistance | ||
| default = 0 | | default = 0 | ||
| min = 0 | | min = 0{{until|JE 26.2}}<br>-2{{upcoming|JE 26.2}} | ||
| max = 1 | | max = 1 | ||
}} | }} | ||
This attribute determines the | 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:explosion]]s.<ref>{{bug|MC-32578}}</ref> | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Iron Golem}} | | {{EntityLink|Iron Golem}} {{EntityLink|Warden}} | ||
| 1 | | 1 | ||
|- | |- | ||
| {{EntityLink|Ravager}} || 0.75 | | {{EntityLink|Ravager}} || 0.75 | ||
|- | |- | ||
| {{EntityLink|Hoglin}} | | {{EntityLink|Hoglin}} {{EntityLink|Zoglin}} | ||
| 0.6 | | 0.6 | ||
|- | |- | ||
| | | {{EntityLink|Nautilus}} {{EntityLink|Zombie Nautilus}} | ||
| 0.6 | |||
|} | |} | ||
{{-}}{{anchor|luck}} | {{-}}{{anchor|luck}} | ||
=== Luck === | === Luck === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Luck | |||
| id = luck | | id = luck | ||
| default = 0 | | default = 0 | ||
| Line 399: | Line 414: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute affects the results of [[Minecraft:loot | |||
This attribute affects the results of [[Minecraft:loot table]]s, with a higher attribute value increasing the amount and quality of results. | |||
The number of rolls is increased by the [[Minecraft:Loot table#Pool|pools]] "bonus rolls"-value times this attributes value, rounded down, and the weight of each [[Minecraft:Loot table#Entry|entry]] is increased by its quality times this attributes value, also rounded down. | |||
Only players have this attribute. | |||
{{-}}{{anchor|max_absorption}} | {{-}}{{anchor|max_absorption}} | ||
=== Max | |||
=== Max Absorption === | |||
{{Infobox attribute | {{Infobox attribute | ||
| title = Max Absorption | |||
| id = max_absorption | | id = max_absorption | ||
| default = {{hp|0|absorption=1}} | | default = {{hp|0|absorption=1}} | ||
| Line 409: | Line 431: | ||
| max = {{hp|2048|absorption=1}} | | max = {{hp|2048|absorption=1}} | ||
}} | }} | ||
This attribute | This attribute determines an entity's maximum [[Minecraft:absorption]]. | ||
{{-}}{{anchor|max_health}} | {{-}}{{anchor|max_health}} | ||
=== Max | === Max Health === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Max Health | |||
| id = max_health | | id = max_health | ||
| template = hp | | template = hp | ||
| Line 420: | Line 443: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute | This attribute determines an entity's maximum [[Minecraft:health]]. It determines the highest health they may be healed to. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |||
| {{EntityLink|Warden}} | |||
| {{hp|500}} | |||
|- | |||
| {{EntityLink|Wither}} | |||
| {{hp|300}} | |||
|- | |||
| {{EntityLink|Ender Dragon}} | |||
| {{hp|200}} | |||
|- | |||
| {{EntityLink|Iron Golem}} {{EntityLink|Giant}} {{EntityLink|Ravager}} | |||
| {{hp|100}} | |||
|- | |||
| {{EntityLink|Elder Guardian}} | |||
| {{hp|80}} | |||
|- | |||
| {{EntityLink|Piglin Brute}} | |||
| {{hp|50}} | |||
|- | |||
| {{EntityLink|Tamed Wolf}} {{EntityLink|Enderman}} {{EntityLink|Zoglin}} {{EntityLink|Hoglin}} | |||
| {{hp|40}} | |||
|- | |||
| {{EntityLink|Camel}} {{EntityLink|Camel Husk}} {{EntityLink|Illusioner}} | |||
| {{hp|32}} | |||
|- | |||
| {{EntityLink|Polar Bear}} {{EntityLink|Guardian}} {{EntityLink|Shulker}} {{EntityLink|Breeze}} {{EntityLink|Turtle}} | |||
| {{hp|30}} | |||
|- | |||
| {{EntityLink|Witch}} | |||
| {{hp|26}} | |||
|- | |||
| {{EntityLink|Zombie Horse}} | |||
| {{hp|25}} | |||
|- | |||
| {{EntityLink|Evoker}} {{EntityLink|Pillager}} {{EntityLink|Vindicator}} | |||
| {{hp|24}} | |||
|- | |- | ||
| '' | | {{EntityLink|Happy Ghast}} | ||
| | | {{hp|20}} | ||
|- | |||
| {{EntityLink|Piglin}} {{EntityLink|Bogged}} {{EntityLink|Parched}} {{EntityLink|Spider}} | |||
| {{hp|16}} | |||
|- | |||
| {{EntityLink|Skeleton Horse}} {{EntityLink|Nautilus}} {{EntityLink|Zombie Nautilus}} | |||
| {{hp|15}} | |||
|- | |||
| {{EntityLink|Axolotl}} {{EntityLink|Sniffer}} | |||
| {{hp|14}} | |||
|- | |||
| {{EntityLink|Armadillo}} {{EntityLink|Copper Golem}} {{EntityLink|Cave Spider}} | |||
| {{hp|12}} | |||
|- | |||
| {{EntityLink|Bee}} {{EntityLink|Cow}} {{EntityLink|Mooshroom}} {{EntityLink|Dolphin}} {{EntityLink|Cat}} {{EntityLink|Ocelot}} {{EntityLink|Fox}} {{EntityLink|Frog}} {{EntityLink|Goat}} {{EntityLink|Panda}} {{EntityLink|Pig}} {{EntityLink|Squid}} {{EntityLink|Glow Squid}} {{EntityLink|Ghast}} | |||
| {{hp|10}} | |||
|- | |||
| {{EntityLink|Sheep}} {{EntityLink|Wolf}} {{EntityLink|Endermite}} {{EntityLink|Silverfish}} | |||
| {{hp|8}} | |||
|- | |||
| {{EntityLink|Bat}} {{EntityLink|Tadpole}} {{EntityLink|Parrot}} | |||
| {{hp|6}} | |||
|- | |||
| {{EntityLink|Chicken}} {{EntityLink|Snow Golem}} | |||
| {{hp|4}} | |||
|- | |||
| {{EntityLink|Cod}} {{EntityLink|Salmon}} {{EntityLink|Tropical Fish}} {{EntityLink|Pufferfish}} {{EntityLink|Rabbit}} | |||
| {{hp|3}} | |||
|- | |||
| {{EntityLink|Creaking}} | |||
| {{hp|1}} | |||
|- | |||
| {{EntityLink|Horse}} {{EntityLink|Donkey}} {{EntityLink|Mule}} {{EntityLink|Llama}} {{EntityLink|Trader Llama}} | |||
| Random<br>({{hp|15}} - {{hp|30}}) | |||
|- | |||
| {{EntityLink|Slime}} {{EntityLink|Magma Cube}} | |||
| {{hp|1}} × ''Size'' × ''Size'' | |||
|- | |||
| {{EntityLink|Sulfur Cube}} | |||
| {{hp|4}} × ''Size'' | |||
|} | |} | ||
{{-}}{{anchor|mining_efficiency}} | {{-}}{{anchor|mining_efficiency}} | ||
=== Mining | === Mining Efficiency === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Mining Efficiency | |||
| id = mining_efficiency | | id = mining_efficiency | ||
| default = 0 | | default = 0 | ||
| Line 437: | Line 536: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute | This attribute increases the speed at which a [[Minecraft:player]] [[Minecraft:Breaking|breaks blocks]]. Only players have this attribute. | ||
{{-}}{{anchor|movement_efficiency}} | {{-}}{{anchor|movement_efficiency}} | ||
=== Movement | === Movement Efficiency === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Movement Efficiency | |||
| id = movement_efficiency | | id = movement_efficiency | ||
| default = 0 | | default = 0 | ||
| Line 447: | Line 547: | ||
| max = 1 | | max = 1 | ||
}} | }} | ||
This attribute is a factor to improve walking on terrain that slows down movement. A value of 1 removes the slowdown. | 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. | ||
{{-}}{{anchor|movement_speed}} | {{-}}{{anchor|movement_speed}} | ||
=== | === Speed === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Speed | |||
| id = movement_speed | | id = movement_speed | ||
| default = 0.7 | | default = 0.7 | ||
| Line 457: | Line 558: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
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]].) | |||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Dolphin}} || 1.2 | | {{EntityLink|Dolphin}} || 1.2 | ||
| Line 476: | Line 568: | ||
| 1.1 | | 1.1 | ||
|- | |- | ||
| {{EntityLink|Axolotl}} | | {{EntityLink|Axolotl}} {{EntityLink|Frog}} {{EntityLink|Nautilus}} {{EntityLink|Tadpole}} | ||
| 1 | | 1 | ||
|- | |- | ||
| {{EntityLink|Armor Stand}} | | {{EntityLink|Armor Stand}} {{EntityLink|Bat}} {{EntityLink|Cod}} {{EntityLink|Ender Dragon}} {{EntityLink|Ghast}} {{EntityLink|Glow Squid}} {{EntityLink|Phantom}} {{EntityLink|Pufferfish}} {{EntityLink|Salmon}} {{EntityLink|Shulker}} {{EntityLink|Squid}} {{EntityLink|Tropical Fish}} {{EntityLink|Vex}} {{EntityLink|Wandering Trader}} | ||
| 0.7 | | 0.7 | ||
|- | |- | ||
| {{EntityLink|Breeze}} | | {{EntityLink|Breeze}} | ||
| 0.63 | |||
|- | |||
| {{EntityLink|Wither}} | |||
| 0.6 | | 0.6 | ||
|- | |- | ||
| {{EntityLink|Evoker}} | | {{EntityLink|Evoker}} {{EntityLink|Giant}} {{EntityLink|Guardian}} {{EntityLink|Illusioner}} {{EntityLink|Villager}} | ||
| 0.5 | | 0.5 | ||
|- | |- | ||
| {{EntityLink|Piglin}} | | {{EntityLink|Piglin}} {{EntityLink|Piglin Brute}} {{EntityLink|Pillager}} {{EntityLink|Vindicator}} | ||
| 0.35 | | 0.35 | ||
|- | |- | ||
| {{EntityLink| | | {{EntityLink|Creaking}} | ||
| 0. | | 0.4 | ||
|- | |- | ||
| {{EntityLink|Bee}} | | {{EntityLink|Bee}} {{EntityLink|Cat}} {{EntityLink|Cave Spider}} {{EntityLink|Elder Guardian}} {{EntityLink|Enderman}} {{EntityLink|Fox}} {{EntityLink|Hoglin}} {{EntityLink|Ocelot}} {{EntityLink|Rabbit}} {{EntityLink|Ravager}} {{EntityLink|Spider}} {{EntityLink|Warden}} {{EntityLink|Wolf}} {{EntityLink|Zoglin}} | ||
| 0.3 | | 0.3 | ||
|- | |- | ||
| {{EntityLink|Chicken}} | | {{EntityLink|Chicken}} {{EntityLink|Creeper}} {{EntityLink|Endermite}} {{EntityLink|Iron Golem}} {{EntityLink|Pig}} {{EntityLink|Polar Bear}} {{EntityLink|Silverfish}} {{EntityLink|Skeleton}} {{EntityLink|Stray}} {{EntityLink|Bogged}} {{EntityLink|Parched}} {{EntityLink|Turtle}} {{EntityLink|Witch}} {{EntityLink|Wither Skeleton}} | ||
| 0.25 | | 0.25 | ||
|- | |- | ||
| {{EntityLink|Blaze}} | | {{EntityLink|Blaze}} {{EntityLink|Drowned}} {{EntityLink|Husk}} {{EntityLink|Sheep}} {{EntityLink|Zombie}} {{EntityLink|Zombie Villager}} {{EntityLink|Zombified Piglin}} | ||
| 0.23 | | 0.23 | ||
|- | |- | ||
| {{EntityLink|Cow}} | | {{EntityLink|Cow}} {{EntityLink|Goat}} {{EntityLink|Mooshroom}} {{EntityLink|Parrot}} {{EntityLink|Skeleton Horse}} {{EntityLink|Snow Golem}} {{EntityLink|Copper Golem}} {{EntityLink|Magma Cube}} | ||
| 0.2 | | 0.2 | ||
|- | |- | ||
| | | {{EntityLink|Llama}} {{EntityLink|Strider}} {{EntityLink|Trader Llama}} | ||
| 0.175 | | 0.175 | ||
|- | |- | ||
| Line 513: | Line 608: | ||
| {{EntityLink|Armadillo}} || 0.14 | | {{EntityLink|Armadillo}} || 0.14 | ||
|- | |- | ||
| {{EntityLink|Allay}} | | {{EntityLink|Allay}} {{EntityLink|Sniffer}} {{EntityLink|Player}} | ||
| 0.1 | | 0.1 | ||
|- | |- | ||
| {{EntityLink|Camel}} || 0.09 | | {{EntityLink|Camel}} {{EntityLink|Camel Husk}} || 0.09 | ||
|- | |- | ||
| {{EntityLink|id=lazy-panda|Panda}} (lazy) || 0.07 | | {{EntityLink|id=lazy-panda|Panda}} (lazy) || 0.07 | ||
|- | |- | ||
| {{EntityLink|Happy Ghast}} || 0.05 | | {{EntityLink|Happy Ghast}} || 0.05 | ||
|- | |||
| {{EntityLink|Horse}} {{EntityLink|Donkey}} {{EntityLink|Mule}} | |||
| Random (0.1125 – 0.3375) | |||
|- | |||
| {{EntityLink|Zombie Horse}} | |||
| Random (0.2135 – 0.2846) | |||
|- | |||
| {{EntityLink|Slime}} {{EntityLink|Sulfur Cube}} | |||
| 0.2 + (0.1 × ''Size'') | |||
|} | |} | ||
{{ | |||
{{-}}{{anchor|nameplate_distance}} | |||
=== Name Tag Distance === | |||
{{Infobox attribute | |||
| title = Name Tag Distance | |||
| id = name_tag_distance | |||
| default = 64 | |||
| min = 0 | |||
| max = 512 | |||
}} | |||
This attribute determines the distance within which an entity's [[Minecraft:custom name]] is visible.{{upcoming|java 26.2}} | |||
{{-}}{{anchor|oxygen_bonus}} | {{-}}{{anchor|oxygen_bonus}} | ||
=== Oxygen Bonus === | |||
=== Oxygen | |||
{{Infobox attribute | {{Infobox attribute | ||
| title = Oxygen Bonus | |||
| id = oxygen_bonus | | id = oxygen_bonus | ||
| default = 0 | | default = 0 | ||
| Line 532: | Line 647: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute determines the chance that an entity's | This attribute determines the chance that an entity's remaining air decreases while underwater in any given game tick. The chance is given by {{frac|1|(oxygen_bonus + 1)}}. | ||
{{-}}{{anchor|safe_fall_distance}} | {{-}}{{anchor|safe_fall_distance}} | ||
=== Safe | === Safe Fall Distance === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Safe Fall Distance | |||
| id = safe_fall_distance | | id = safe_fall_distance | ||
| default = 3 | | default = 3 | ||
| Line 542: | Line 658: | ||
| max = 1024 | | max = 1024 | ||
}} | }} | ||
This attribute determines the | This attribute determines the distance in blocks an entity can fall before [[Minecraft:fall damage]] starts to accumulate. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Camel}} | | {{EntityLink|Camel}} {{EntityLink|Camel Husk}} {{EntityLink|Donkey}} {{EntityLink|Horse}} {{EntityLink|Llama}} {{EntityLink|Mule}} {{EntityLink|Skeleton Horse}} {{EntityLink|Trader Llama}} {{EntityLink|Zombie Horse}} | ||
| 6 | | 6 | ||
|- | |- | ||
| {{EntityLink|Fox}} | | {{EntityLink|Fox}} | ||
| 5 | | 5 | ||
|} | |} | ||
| Line 559: | Line 673: | ||
=== Scale === | === Scale === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Scale | |||
| id = scale | | id = scale | ||
| default = 1 | | default = 1 | ||
| Line 564: | Line 679: | ||
| max = 16 | | max = 16 | ||
}} | }} | ||
This attribute multiplies | This attribute multiplies an entity's size and [[Minecraft:hitbox]] dimensions. | ||
{{-}}{{anchor|sneaking_speed}} | |||
=== Sneaking Speed === | |||
{{Infobox attribute | |||
| title = Sneaking Speed | |||
| id = sneaking_speed | |||
| default = 0.3 | |||
| min = 0 | |||
| max = 1 | |||
}} | |||
This attribute multiplies a player's movement speed when [[Minecraft:sneaking]] or [[Minecraft:crawling]]. Only players have this attribute. | |||
{{-}}{{anchor|spawn_reinforcements}} | {{-}}{{anchor|spawn_reinforcements}} | ||
=== | === Zombie Reinforcements === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Zombie Reinforcements | |||
| id = spawn_reinforcements | | id = spawn_reinforcements | ||
| default = 0 | | default = 0 | ||
| Line 574: | Line 701: | ||
| max = 1 | | max = 1 | ||
}} | }} | ||
This attribute determines the chance for a zombie to spawn another zombie when attacked. | This attribute determines the chance for a [[Minecraft:zombie]] to spawn another zombie when attacked. Only the entities listed below have this attribute. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Zombie}} | | {{EntityLink|Zombie}} {{EntityLink|Husk}} {{EntityLink|Drowned}} {{EntityLink|Zombie Villager}} | ||
| Random<br>( | | Random<br>(0 – 0.1) | ||
|- | |- | ||
| {{EntityLink|Zombified Piglin}} | | {{EntityLink|Zombified Piglin}} | ||
| 0<ref>{{bug|MC-301000}}</ref> | | 0<ref>{{bug|MC-301000}}</ref> | ||
|} | |} | ||
{{-}}{{anchor|step_height}} | {{-}}{{anchor|step_height}} | ||
=== Step | === Step Height === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Step Height | |||
| id = step_height | | id = step_height | ||
| default = 0.6 | | default = 0.6 | ||
| Line 604: | Line 722: | ||
| max = 10 | | max = 10 | ||
}} | }} | ||
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 | 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>{{bug|MC-268917}}</ref> | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Camel}} || 1.5 | | {{EntityLink|Camel}} {{EntityLink|Camel Husk}} || 1.5 | ||
|- | |- | ||
| {{EntityLink|Axolotl}} | | {{EntityLink|Creaking}} || 1.0625 | ||
|- | |||
| {{EntityLink|Axolotl}} {{EntityLink|Donkey}} {{EntityLink|Drowned}} {{EntityLink|Enderman}} {{EntityLink|Frog}} {{EntityLink|Horse}} {{EntityLink|Iron Golem}} {{EntityLink|Llama}} {{EntityLink|Mule}} {{EntityLink|Ravager}} {{EntityLink|Skeleton Horse}} {{EntityLink|Trader Llama}} {{EntityLink|Turtle}} {{EntityLink|Zombie Horse}} {{EntityLink|Copper Golem}} | |||
| 1 | | 1 | ||
|- | |- | ||
| {{EntityLink|Armor Stand}} | | {{EntityLink|Armor Stand}} | ||
| 0<ref>{{bug|MC-133544|||WAI}}</ref> | | 0<ref>{{bug|MC-133544|||WAI}}</ref> | ||
|} | |} | ||
{{-}}{{anchor|submerged_mining_speed}} | {{-}}{{anchor|submerged_mining_speed}} | ||
=== Submerged | === Submerged Mining Speed === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Submerged Mining Speed | |||
| id = submerged_mining_speed | | id = submerged_mining_speed | ||
| default = 0.2 | | default = 0.2 | ||
| Line 629: | Line 748: | ||
| max = 20 | | max = 20 | ||
}} | }} | ||
This attribute | This attribute multiplies a player's mining speed when underwater. Only players have this attribute. | ||
{{-}}{{anchor|sweeping_damage_ratio}} | {{-}}{{anchor|sweeping_damage_ratio}} | ||
=== Sweeping | === Sweeping Damage Ratio === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Sweeping Damage Ratio | |||
| id = sweeping_damage_ratio | | id = sweeping_damage_ratio | ||
| default = 0 | | default = 0 | ||
| Line 639: | Line 759: | ||
| max = 1 | | max = 1 | ||
}} | }} | ||
This attribute determines | 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. | ||
{{-}}{{anchor|tempt_range}} | {{-}}{{anchor|tempt_range}} | ||
=== Tempt | === Mob Tempt Range === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Mob Tempt Range | |||
| id = tempt_range | | id = tempt_range | ||
| default = 10 | | default = 10 | ||
| Line 650: | Line 771: | ||
}} | }} | ||
This attribute determines the range | This attribute determines the range in blocks in which a mob can be tempted, following a player holding a specific item. | ||
{|class=wikitable | {|class=wikitable | ||
!Entity !! | !Entity !! Base value | ||
|- | |- | ||
|{{EntityLink|Happy Ghast}} || 16 | |{{EntityLink|Happy Ghast}} || 16 | ||
|- | |- | ||
| | |{{EntityLink|Armadillo}} {{EntityLink|Axolotl}} {{EntityLink|Bee}} {{EntityLink|Chicken}} {{EntityLink|Cow}} {{EntityLink|Mooshroom}} {{EntityLink|Horse}} {{EntityLink|Donkey}} {{EntityLink|Mule}} {{EntityLink|Llama}} {{EntityLink|Trader Llama}} {{EntityLink|Zombie Horse}} {{EntityLink|Skeleton Horse}} {{EntityLink|Cat}} {{EntityLink|Ocelot}} {{EntityLink|Fox}} {{EntityLink|Frog}} {{EntityLink|Tadpole}} {{EntityLink|Goat}} {{EntityLink|Nautilus}} {{EntityLink|Zombie Nautilus}} {{EntityLink|Panda}} {{EntityLink|Parrot}} {{EntityLink|Pig}} {{EntityLink|Polar Bear}} {{EntityLink|Rabbit}} {{EntityLink|Sheep}} {{EntityLink|Sniffer}} {{EntityLink|Turtle}} {{EntityLink|Wolf}} {{EntityLink|Strider}} || 10 | ||
|- | |- | ||
| | |{{EntityLink|Sulfur Cube}} || 8 | ||
|} | |} | ||
{{-}}{{anchor|water_movement_efficiency}} | {{-}}{{anchor|water_movement_efficiency}} | ||
=== Water | === Water Movement Efficiency === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Water Movement Efficiency | |||
| id = water_movement_efficiency | | id = water_movement_efficiency | ||
| default = 0 | | default = 0 | ||
| Line 670: | Line 792: | ||
| max = 1 | | max = 1 | ||
}} | }} | ||
This attribute | This attribute determines movement speed and drag when submerged.{{info needed}} | ||
{{-}}{{anchor|waypoint_receive_range}} | {{-}}{{anchor|waypoint_receive_range}} | ||
=== Waypoint | === Waypoint Receive Range === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Waypoint Receive Range | |||
| id = waypoint_receive_range | | id = waypoint_receive_range | ||
| default = 0 | | default = 0 | ||
| Line 680: | Line 803: | ||
| max = 60,000,000 | | max = 60,000,000 | ||
}} | }} | ||
This attribute determines the maximum distance from | 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. | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Player}} || 60,000,000 | | {{EntityLink|Player}} || 60,000,000 | ||
|} | |} | ||
{{-}}{{anchor|waypoint_transmit_range}} | {{-}}{{anchor|waypoint_transmit_range}} | ||
=== Waypoint | === Waypoint Transmit Range === | ||
{{Infobox attribute | {{Infobox attribute | ||
| title = Waypoint Transmit Range | |||
| id = waypoint_transmit_range | | id = waypoint_transmit_range | ||
| default = 0 | | default = 0 | ||
| Line 701: | Line 823: | ||
{| class=wikitable | {| class=wikitable | ||
! Entity !! | ! Entity !! Base value | ||
|- | |- | ||
| {{EntityLink|Player}} || 60,000,000 | | {{EntityLink|Player}} || 60,000,000 | ||
|} | |} | ||
| Line 712: | Line 832: | ||
== Modifiers == | == 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 === | === Operations === | ||
A modifier may perform one of three possible operations: | |||
{|class="wikitable" | {|class="wikitable" | ||
| Line 736: | Line 856: | ||
| Multiplies the base attribute by (1 + sum of modifiers' amounts). | | 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>{{note| | <math>\text{Total} = \text{Base} \times (1 + \text{Amount}_1 + \text{Amount}_2 + \ldots + \text{Amount}_n)</math>{{note|Simplified, the calculation used in the game's code is like: <math>\text{Total} = \text{Base} + (\text{Base} \times \text{Amount}_1) + (\text{Base} \times \text{Amount}_2) + \ldots + (\text{Base} \times \text{Amount}_n)</math>}} | ||
For example, applying two '''add_multiplied_base''' modifiers with amounts of 2 and 4, to attribute base of 3: | For example, applying two '''add_multiplied_base''' modifiers with amounts of 2 and 4, to attribute base of 3: | ||
| Line 752: | Line 872: | ||
|} | |} | ||
If multiple | If multiple modifiers are applied to an attribute, the game first executes all {{cd|add_value}} modifiers, then all {{cd|add_multiplied_base}} modifiers, and finally all {{cd|add_multiplied_total}} 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 {{Command|attribute}} command can add or remove specific modifiers, including custom ones. Except for players, it is also possible add, remove and custom with {{cmd|data}}. | |||
{{ | ==== Items ==== | ||
The [[Minecraft:Data_component_format#attribute_modifiers|{{cd|attribute_modifiers}} 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: | |||
{| class="wikitable stikitable sortable collapsible" style="width:100%" data-description="Modifiers" | {| class="wikitable stikitable sortable collapsible" style="width:100%" data-description="Modifiers" | ||
! Modifier ID | ! Modifier ID | ||
! | ! Attribute | ||
! | ! Items | ||
|- | |- | ||
|minecraft: | |{{cd|minecraft:base_attack_damage}} | ||
|{{cd|[[#attack_damage|attack_damage]]}} | |||
| | |{{ItemLink|Swords}} {{ItemLink|Spears}} {{ItemLink|Trident}} {{ItemLink|Mace}} {{ItemLink|Axes}} {{ItemLink|Pickaxes}} {{ItemLink|Shovels}} {{ItemLink|Hoes}} | ||
|- | |- | ||
|minecraft: | |{{cd|minecraft:base_attack_speed}} | ||
| | |{{cd|[[#attack_speed|attack_speed]]}} | ||
| | |{{ItemLink|Swords}} {{ItemLink|Spears}} {{ItemLink|Trident}} {{ItemLink|Mace}} {{ItemLink|Axes}} {{ItemLink|Pickaxes}} {{ItemLink|Shovels}} {{ItemLink|Hoes}} | ||
|- | |- | ||
|minecraft:armor.helmet | |{{cd|minecraft:armor.helmet}} | ||
minecraft:armor.chestplate | |{{cd|[[#armor|armor]]}}<br>{{cd|[[#armor_toughness|armor_toughness]]}}<br>{{cd|[[#knockback_resistance|knockback_resistance]]}} | ||
|{{ItemLink|Helmets}} | |||
|- | |||
|{{cd|minecraft:armor.chestplate}} | |||
|{{cd|[[#armor|armor]]}}<br>{{cd|[[#armor_toughness|armor_toughness]]}}<br>{{cd|[[#knockback_resistance|knockback_resistance]]}} | |||
|{{ItemLink|Chestplates}} | |||
|- | |||
|{{cd|minecraft:armor.leggings}} | |||
|{{cd|[[#armor|armor]]}}<br>{{cd|[[#armor_toughness|armor_toughness]]}}<br>{{cd|[[#knockback_resistance|knockback_resistance]]}} | |||
|{{ItemLink|Leggings}} | |||
|- | |||
|{{cd|minecraft:armor.boots}} | |||
|{{cd|[[#armor|armor]]}}<br>{{cd|[[#armor_toughness|armor_toughness]]}}<br>{{cd|[[#knockback_resistance|knockback_resistance]]}} | |||
|{{ItemLink|Boots}} | |||
|- | |||
|{{cd|minecraft:armor.body}} | |||
|{{cd|[[#armor|armor]]}}<br>{{cd|[[#armor_toughness|armor_toughness]]}}<br>{{cd|[[#knockback_resistance|knockback_resistance]]}} | |||
|{{ItemLink|Horse Armor}} {{ItemLink|Nautilus Armor}} {{ItemLink|Wolf Armor}} | |||
|- | |||
|{{cd|minecraft:waypoint_transmit_range_hide}} | |||
|{{cd|[[#waypoint_transmit_range|waypoint_transmit_range]]}} | |||
|{{BlockLink|Carved Pumpkin}} {{BlockLink|Heads}} | |||
|} | |||
==== Enchantments ==== | |||
Enchantment [[Minecraft:Enchantment_definition#Attribute_effects|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 {{cd|/}} followed by the name of the slot the enchantment is active in. | |||
{| class="wikitable stikitable sortable collapsible" style="width:100%" data-description="Modifiers" | |||
! Modifier ID | |||
! Attribute | |||
! [[Minecraft:Level-based value]] | |||
! Operation | |||
! Enchantment | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:enchantment.aqua_affinity}} | ||
minecraft: | |{{cd|[[#submerged_mining_speed|submerged_mining_speed]]}} | ||
| | |||
type: {{cd|minecraft:linear}}, <br> | |||
base: 4.0,<br> | |||
per_level_above_first: 4.0 | |||
| add_multiplied_total | |||
|[[Minecraft:Aqua Affinity]] | |||
|- | |||
|{{cd|minecraft:enchantment.blast_protection}} | |||
|{{cd|[[#explosion_knockback_resistance|explosion_knockback_resistance]]}} | |||
| | |||
type: {{cd|minecraft:linear}}, <br> | |||
base: 0.15,<br> | |||
per_level_above_first: 0.15 | |||
|add_value | |||
|[[Minecraft:Blast Protection]] | |||
|- | |||
|{{cd|minecraft:enchantment.depth_strider}} | |||
|{{cd|[[#water_movement_efficiency|water_movement_efficiency]]}} | |||
| | |||
type: {{cd|minecraft:linear}}, <br> | |||
base: 0.33333334,<br> | |||
per_level_above_first: 0.33333334 | |||
|add_value | |||
|[[Minecraft:Depth Strider]] | |||
|- | |||
|{{cd|minecraft:enchantment.efficiency}} | |||
|{{cd|[[#mining_efficiency|mining_efficiency]]}} | |||
| | |||
type: {{cd|minecraft:levels_squared}}, <br> | |||
added: 1.0 | |||
|add_value | |||
|[[Minecraft:Efficiency]] | |||
|- | |||
|{{cd|minecraft:enchantment.fire_protection}} | |||
|{{cd|[[#burning_time|burning_time]]}} | |||
|type: {{cd|minecraft:linear}}, <br> | |||
base: -0.15,<br> | |||
per_level_above_first: -0.15 | |||
| add_multiplied_base | |||
|[[Minecraft:Fire Protection]] | |||
|- | |||
|{{cd|minecraft:enchantment.respiration}} | |||
|{{cd|[[#oxygen_bonus|oxygen_bonus]]}} | |||
|type: {{cd|minecraft:linear}}, <br> | |||
base: 1.0,<br> | |||
per_level_above_first: 1.0 | |||
|add_value | |||
|[[Minecraft:Respiration]] | |||
|- | |||
| rowspan="2" |{{cd|minecraft:enchantment.soul_speed}} | |||
|{{cd|[[#movement_speed|movement_speed]]}} | |||
|type: {{cd|minecraft:linear}}, <br> | |||
base: 0.0405,<br> | |||
per_level_above_first: 0.0105 | |||
|add_value | |||
| rowspan="2" |[[Minecraft:Soul Speed]] | |||
|- | |||
| {{cd|[[#movement_efficiency|movement_efficiency]]}} | |||
|1.0 | |||
|add_value | |||
|- | |||
|{{cd|minecraft:enchantment.sweeping_edge}} | |||
|{{cd|[[#sweeping_damage_ratio|sweeping_damage_ratio]]}} | |||
| | |||
{{Collapse|title= type: {{cd|minecraft:fraction}}| content= | |||
denominator: { | |||
:type: {{cd|minecraft:linear}}<Br> | |||
:base: 2.0,<Br> | |||
:per_level_above_first: 1.0<Br> | |||
},<Br> | |||
numerator: { | |||
:type: {{cd|minecraft:linear}},<Br> | |||
:base: 1.0,<Br> | |||
:per_level_above_first: 1.0<Br> | |||
} | |||
}} | |||
|add_value | |||
|[[Minecraft:Sweeping Edge]] | |||
|- | |||
|{{cd|minecraft:enchantment.swift_sneak}} | |||
|{{cd|[[#sneaking_speed|sneaking_speed]]}} | |||
| | |||
type: {{cd|minecraft:linear}}, <br> | |||
base: 0.15,<br> | |||
per_level_above_first: 0.15 | |||
|add_value | |||
|[[Minecraft:Swift Sneak]] | |||
|} | |||
==== Effects ==== | |||
Some [[Minecraft:status effect]]s 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 {{cd|amplifier + 1}}). | |||
minecraft: | {| class="wikitable stikitable sortable collapsible" style="width:100%" data-description="Modifiers" | ||
| | ! Modifier ID | ||
| | ! Attribute | ||
! Value | |||
! Operation | |||
! Effect | |||
|- | |||
|{{cd|minecraft:effect.speed}} | |||
|{{cd|[[#movement_speed|movement_speed]]}} | |||
| 0.2 | |||
| add_multiplied_total | |||
|{{EffectLink|Speed}} | |||
|- | |||
|{{cd|minecraft:effect.slowness}} | |||
|{{cd|[[#movement_speed|movement_speed]]}} | |||
| -0.15 | |||
| add_multiplied_total | |||
|{{EffectLink|Slowness}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.haste}} | ||
|{{cd|[[#attack_speed|attack_speed]]}} | |||
| 0.1 | |||
| add_multiplied_total | |||
|{{EffectLink|Haste}} | |||
| | |||
| | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.mining_fatigue}} | ||
| | |{{cd|[[#attack_speed|attack_speed]]}} | ||
| | | -0.1 | ||
| add_multiplied_total | |||
|{{EffectLink|Mining Fatigue}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.strength}} | ||
| | |{{cd|[[#attack_damage|attack_damage]]}} | ||
| | | 3.0 | ||
| add_value | |||
|{{EffectLink|Strength}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.weakness}} | ||
| | |{{cd|[[#attack_damage|attack_damage]]}} | ||
| | | -4.0 | ||
| add_value | |||
|{{EffectLink|Weakness}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.jump_boost}} | ||
|{{cd|[[#safe_fall_distance|safe_fall_distance]]}} | |||
| | | 1.0 | ||
| add_value | |||
|{{EffectLink|Jump Boost}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.waypoint_transmit_range_hide}} | ||
| | |{{cd|[[#waypoint_transmit_range|waypoint_transmit_range]]}} | ||
| | | -1.0 | ||
| add_multiplied_total | |||
|{{EffectLink|Invisibility}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.health_boost}} | ||
| | |{{cd|[[#max_health|max_health]]}} | ||
| | | 4.0 | ||
| add_value | |||
|{{EffectLink|Health Boost}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.absorption}} | ||
| | |{{cd|[[#max_absorption|max_absorption]]}} | ||
| | | 4.0 | ||
| add_value | |||
|{{EffectLink|Absorption}} | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:effect.luck}} | ||
|{{cd|[[#luck|luck]]}} | |||
| | | 1.0 | ||
| add_value | |||
|{{EffectLink|Luck}} | |||
|- | |- | ||
|minecraft:effect. | |{{cd|minecraft:effect.unluck}} | ||
| | |{{cd|[[#luck|luck]]}} | ||
| | | -1.0 | ||
| add_value | |||
|{{EffectLink|Bad Luck}} | |||
|} | |||
==== Sulfur Cube Archetypes ==== | |||
{{Missing information|{{cd|explosion_knockback_resistance}} attribute}} | |||
[[Minecraft:Sulfur cube archetype definition]]s 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 actual values are slightly different--> | |||
The vanilla archetypes add and remove modifiers with the following IDs: | |||
{| class="wikitable stikitable sortable collapsible" style="width:100%" data-description="Modifiers" | |||
! Modifier ID | |||
! Attribute | |||
! Operation | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:bouncy_add_knockback_resistance}}<br>{{cd|minecraft:fast_flat_add_knockback_resistance}}<br>{{cd|minecraft:fast_sliding_add_knockback_resistance}}<br>{{cd|minecraft:high_resistance_add_knockback_resistance}}<br>{{cd|minecraft:light_add_knockback_resistance}}<br>{{cd|minecraft:regular_add_knockback_resistance}}<br>{{cd|minecraft:slow_flat_add_knockback_resistance}}<br>{{cd|minecraft:slow_sliding_add_knockback_resistance}}<br>{{cd|minecraft:sticky_add_knockback_resistance}} | ||
| | |{{cd|[[#knockback_resistance|knockback_resistance]]}} | ||
| | | add_value | ||
|- | |- | ||
|minecraft: | |{{cd|minecraft:bouncy_add_bounciness}}<br>{{cd|minecraft:fast_flat_add_bounciness}}<br>{{cd|minecraft:fast_sliding_add_bounciness}}<br>{{cd|minecraft:high_resistance_add_bounciness}}<br>{{cd|minecraft:light_add_bounciness}}<br>{{cd|minecraft:regular_add_bounciness}}<br>{{cd|minecraft:slow_flat_add_bounciness}}<br>{{cd|minecraft:slow_sliding_add_bounciness}}<br>{{cd|minecraft:sticky_add_bounciness}} | ||
| | |{{cd|[[#bounciness|bounciness]]}} | ||
| | | add_value | ||
|- | |- | ||
|minecraft: | |{{cd|minecraft:bouncy_mul_friction_modifier}}<br>{{cd|minecraft:fast_flat_mul_friction_modifier}}<br>{{cd|minecraft:fast_sliding_mul_friction_modifier}}<br>{{cd|minecraft:high_resistance_mul_friction_modifier}}<br>{{cd|minecraft:light_mul_friction_modifier}}<br>{{cd|minecraft:regular_mul_friction_modifier}}<br>{{cd|minecraft:slow_flat_mul_friction_modifier}}<br>{{cd|minecraft:slow_sliding_mul_friction_modifier}}<br>{{cd|minecraft:sticky_mul_friction_modifier}} | ||
| | |{{cd|[[#friction_modifier|friction_modifier]]}} | ||
| | | add_multiplied_total | ||
|- | |- | ||
|minecraft: | |{{cd|minecraft:bouncy_mul_air_drag_modifier}}<br>{{cd|minecraft:fast_flat_mul_air_drag_modifier}}<br>{{cd|minecraft:fast_sliding_mul_air_drag_modifier}}<br>{{cd|minecraft:high_resistance_mul_air_drag_modifier}}<br>{{cd|minecraft:light_mul_air_drag_modifier}}<br>{{cd|minecraft:regular_mul_air_drag_modifier}}<br>{{cd|minecraft:slow_flat_mul_air_drag_modifier}}<br>{{cd|minecraft:slow_sliding_mul_air_drag_modifier}}<br>{{cd|minecraft:sticky_mul_air_drag_modifier}} | ||
| | |{{cd|[[#air_drag_modifier|air_drag_modifier]]}} | ||
| | | add_multiplied_total | ||
|} | |||
==== Hardcoded ==== | |||
Other parts of the game add and remove additional modifiers. In this table, every mention of "zombies" represents the class {{jcp| net.minecraft.world.entity.monster.zombie.Zombie}}, that is, the entities: [[Minecraft:zombie]], [[Minecraft:drowned]], [[Minecraft:husk]], [[Minecraft:zombie villager]], and [[Minecraft:zombified piglin]]. | |||
{| class="wikitable stikitable sortable collapsible" style="width:100%" data-description="Modifiers" | |||
! Modifier ID | |||
! Attribute | |||
! Value | |||
! Operation | |||
! Details | |||
|- | |||
|{{cd|minecraft:random_spawn_bonus}} | |||
|{{cd|[[#follow_range|follow_range]]}} | |||
| {{cd|triangle(0.0, 0.11485)}} | |||
| add_value | |||
|Applied randomly to all mobs when they spawn. | |||
|- | |||
|{{cd|minecraft:random_spawn_bonus}} | |||
|{{cd|[[#knockback_resistance|knockback_resistance]]}} | |||
|{{cd|nextDouble()*0.05}} | |||
| add_value | |||
|Applied randomly to all [[Minecraft:zombie]]s when they spawn. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:zombie_random_spawn_bonus}} | ||
| | |{{cd|[[#follow_range|follow_range]]}} | ||
| | |{{cd|nextDouble()*1.5*[[Minecraft:Difficulty#Clamped_regional_difficulty|difficultyModifier]]}} | ||
| add_multiplied_total | |||
|Applied randomly to some [[Minecraft:zombie]]s when they spawn. Only applies if greater than 1. | |||
|- | |- | ||
|minecraft: | | rowspan="2" |{{cd|minecraft:leader_zombie_bonus}} | ||
| | |{{cd|[[#spawn_reinforcements_chance|spawn_reinforcements_chance]]}} | ||
| | | {{cd|nextDouble()*0.25+0.5}} | ||
| add_value | |||
| rowspan="2" |Applied randomly to some [[Minecraft:zombie]]s to turn them into "[[Minecraft:Zombie#Leader|leaders]]". | |||
|- | |- | ||
| | |{{cd|[[#max_health|max_health]]}} | ||
| | | {{cd|nextDouble()*3.0+1.0}} | ||
| | |add_multiplied_total | ||
|- | |- | ||
|minecraft: | |{{cd|minecraft:reinforcement_caller_charge}} | ||
| | |{{cd|[[#spawn_reinforcements_chance|spawn_reinforcements_chance]]}} | ||
| {{cd|existingAmount - 0.05}} | |||
| add_value | |||
| Applied to a [[Minecraft:zombie]] when it successfully spawns a reinforcement. The {{cd|existingAmount}} is the value of the modifier previously, or {{cd|0.0}} if it does not exist. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:reinforcement_callee_charge}} | ||
| | |{{cd|[[#spawn_reinforcements_chance|spawn_reinforcements_chance]]}} | ||
| -0.05 | |||
| add_value | |||
|Applied to [[Minecraft:zombie]] reinforcements when they spawn. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:baby}} | ||
| | | |{{cd|[[#movement_speed|movement_speed]]}} | ||
| | | {{EntityLink|Zombie}}: 0.5 <Br> {{EntityLink|Piglin}}: 0.2 | ||
| add_multiplied_base | |||
|Applied to [[Minecraft:zombie]]s and [[Minecraft:piglin]]s as babies, and removed when they are not babies. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:attacking}} | ||
| | |{{cd|[[#movement_speed|movement_speed]]}} | ||
| | | {{EntityLink|Enderman}}: 0.15 <Br> {{EntityLink|Zombified piglin}}: 0.05 | ||
| add_value | |||
|Applied to [[Minecraft:endermen]] when they acquire a target, and removed when they lose it.<br>Applied to adult [[Minecraft:zombified piglin]]s when they get angry, and removed when they stop being angry. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:covered}} | ||
|{{cd|[[#armor|armor]]}} | |||
| | |20.0 | ||
|add_value | |||
|Applied to [[Minecraft:shulker]]s when their shell fully closes, and removed when it opens. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:creative_mode_block_range}} | ||
| | |{{cd|[[#block_interaction_range|block_interaction_range]]}} | ||
|0.5 | |||
|add_value | |||
|Applied to [[Minecraft:player]]s when they enter [[Minecraft:creative mode]], and removed when leaving creative mode. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:creative_mode_entity_range}} | ||
| | |{{cd|[[#entity_interaction_range|entity_interaction_range]]}} | ||
| | |2.0 | ||
|add_value | |||
|Applied to [[Minecraft:player]]s when they enter [[Minecraft:creative mode]], and removed when leaving creative mode. | |||
|- | |||
|{{cd|minecraft:drinking}} | |||
|{{cd|[[#movement_speed|movement_speed]]}} | |||
| -0.25 | |||
|add_value | |||
|Applied to [[Minecraft:witch]]es when they start drinking a [[Minecraft:potion]], and removed when they finish drinking it. | |||
|- | |||
|{{cd|minecraft:powder_snow}} | |||
|{{cd|[[#movement_speed|movement_speed]]}} | |||
| {{cd|-0.05*getPercentFrozen()}} | |||
| add_value | |||
|Applied to all [[Minecraft:living entities]] while inside [[Minecraft:powder snow]], and removed when the frost effect wears off. The {{cd|getPercentFrozen()}} is the float {{cd|min(140,[[Minecraft:Entity_format#Entity_format|TicksFrozen]])/140}}. | |||
|- | |||
|{{cd|minecraft:sprinting}} | |||
|{{cd|[[#movement_speed|movement_speed]]}} | |||
| 0.3 | |||
| add_multiplied_total | |||
|Applied to all living entities when they start [[Minecraft:sprinting]], and removed when they stop. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:waypoint_transmit_range_crouch}} | ||
|{{cd|[[#waypoint_transmit_range|waypoint_transmit_range]]}} | |||
| | | -1.0 | ||
| add_multiplied_total | |||
|Applied to [[Minecraft:player]]s when they start [[Minecraft:sneaking]], and removed when they stop. | |||
|- | |- | ||
|minecraft: | |{{cd|minecraft:evil}} | ||
|{{cd|[[#attack_damage|attack_damage]]}} | |||
| | | 5.0 | ||
| add_value | |||
|Applied to [[Minecraft:rabbit]]s when they become [[Minecraft:Rabbit#The Killer Bunny|the killer bunny]], and removed when they become a different variant. | |||
|- | |- | ||
| | |{{cd|minecraft:suffocating}} | ||
| | |{{cd|[[#attack_damage|attack_damage]]}} | ||
| | | -0.34 | ||
| add_multiplied_base | |||
|Applied to [[Minecraft:strider]]s when they become cold outside of [[Minecraft:lava]], and removed when they return to lava. | |||
|} | |} | ||
| Line 949: | Line 1,305: | ||
|{{HistoryLine|||dev=25w17a|{{cd|waypoint_transmit_range}} and {{cd|waypoint_receive_range}} are no longer experimental.}} | |{{HistoryLine|||dev=25w17a|{{cd|waypoint_transmit_range}} and {{cd|waypoint_receive_range}} are no longer experimental.}} | ||
|{{HistoryLine|java upcoming}} | |{{HistoryLine|java upcoming}} | ||
|{{HistoryLine||26.2|dev= | |{{HistoryLine||26.2|dev=snap1|Added {{cd|bounciness}}, {{cd|friction_modifier}}, and {{cd|air_drag_modifier}} attributes.|The minimum value of {{cd|minecraft:knockback_resistance}} is now {{cd|-2.0}}.}} | ||
|{{HistoryLine|||dev=snap 4|Added {{cd|nameplate_distance}} and {{cd|below_name_distance}} attributes.}} | |||
|{{HistoryLine|||dev=snap 5|Renamed {{cd|nameplate_distance}} to {{cd|name_tag_distance}}.}} | |||
|{{HistoryLine|combat java}} | |{{HistoryLine|combat java}} | ||
|{{HistoryLine||1.14.3|Added {{cd|generic.attackReach}} attribute.}} | |{{HistoryLine||1.14.3|Added {{cd|generic.attackReach}} attribute.}} | ||
Latest revision as of 11:01, 6 June 2026
|
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:属性