새로 오신 분들은 길라잡이위키 규칙을 꼭 읽어주세요.  문서 작성번역을 도와주시면 이 위키에 큰 힘이 됩니다.

속성

Minecraft Wiki
Minejango2 (토론 | 기여)님의 2020년 6월 15일 (월) 03:26 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
이동: 둘러보기, 검색

속성은 몹과 플레이어의 버프와 디버프를 조정하는 시스템이다. Attributes also have modifiers that adjust the strength of their effect.

Applying attributes[편집 | 원본 편집]

When applied to an item, a modifier adjusts the corresponding attribute if the item is held or worn.[1][2] Attributes/modifiers can be added to items or mobs without the use of third-party NBT editing software by adding data tags to the give and summon commands. The UUIDs for these modifiers should be randomly chosen, to prevent accidentally using the same UUID as another modifier.

The following command gives the player a diamond sword that deals 20 (Heart.svg × 10) extra damage. If the player changes the operation from 0 to 1 it multiplies the attack damage instead.

[JE 1.16 이전에만]/give @s diamond_sword{AttributeModifiers:[{AttributeName:"generic.attackDamage", Name:"generic.attackDamage", Amount:20.0, Operation:0, UUIDMost:184053922560081L, UUIDLeast:-864050194979497L}]} 1[차기 버전용: JE 1.16]/give @s diamond_sword{AttributeModifiers:[{AttributeName:"generic.attack_damage", Name:"generic.attack_damage", Amount:20.0, Operation:0, UUID:[I; 42853, 1689024593, -201178, -1559272105]}]} 1

The following command summons a zombie that follows players when they are 100 blocks or less from it instead of the usual 40.

[JE 1.16 이전에만]/summon zombie ~ ~ ~ {Attributes:[{Name:"generic.followRange", Base:100.0}]}[차기 버전용: JE 1.16]/summon zombie ~ ~ ~ {Attributes:[{Name:"generic.follow_range", Base:100.0}]}

The player can also specify what slot has certain attributes.

[JE 1.16 이전에만]/give @p diamond_axe{AttributeModifiers:[{Slot:"mainhand", AttributeName:"generic.attackDamage", Name:"generic.attackDamage", Amount:20.0, Operation:0, UUIDMost:-827189226435083L, UUIDLeast:-694401732771116L}]} 1[차기 버전용: JE 1.16]/give @p diamond_axe{AttributeModifiers:[{Slot:"mainhand", AttributeName:"generic.attack_damage", Name:"generic.attack_damage", Amount:20.0, Operation:0, UUID:[I; -192596, -61963, -161679, -10288428]}]} 1

The slot can be mainhand, offhand, head, chest, legs or feet.

Also in case you want the 1.8 attack style try this.

[JE 1.16 이전에만]/give @s shield{Unbreakable:1,AttributeModifiers:[{Slot:"offhand", AttributeName:"generic.attackSpeed", Name:"generic.attackSpeed", Amount:1000.0, Operation:0, UUIDMost:-475293965773951L, UUIDLeast:-6114216658131554L}]} 1[차기 버전용: JE 1.16]/give @s shield{Unbreakable:1,AttributeModifiers:[{Slot:"offhand", AttributeName:"generic.attack_speed", Name:"generic.attack_speed", Amount:1000.0, Operation:0, UUID:[I; -110663, 103297, -1423577, 206238]}]} 1

It gives you the attack speed of 1.8 with the style of 1.9.

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.

Minimum and maximum are inclusive unless specified otherwise or they are equal to 1.7×10308.

Note that attribute modifiers that have the same UUID and affect the same attribute do not stack; only the one that most recently affected a player or mob has an effect, overriding the previously affecting modifier(s).

Attributes available on all living entities[편집 | 원본 편집]

These attributes are found on all living entities, including players.

Attribute Name Description Default Base Minimum Maximum
generic.maxHealth[JE 1.16 이전에만]
generic.max_health‌[차기 버전용: JE 1.16]
The maximum health of this mob (in half-hearts); determines the highest health they may be healed to. If the player is using this to summon a mob with high health, use this and the Health tag {Health:200.0f} for example. 20.0 0.0 1024.0
generic.followRange[JE 1.16 이전에만]
generic.follow_range‌[차기 버전용: JE 1.16]
The range in blocks within which a mob with this attribute targets players or other mobs to track. Exiting this range causes the mob to cease following the player/mob. Actual value used by most mobs is 16; for zombies it is 40. 32.0 0.0 2048.0
generic.knockbackResistance[JE 1.16 이전에만]
generic.knockback_resistance‌[차기 버전용: JE 1.16]
The chance to resist knockback from attacks, explosions, and projectiles. 1.0 is 100% chance for resistance. 0.0 0.0 1.0
generic.movementSpeed[JE 1.16 이전에만]
generic.movement_speed‌[차기 버전용: JE 1.16]
Speed of movement in some unknown metric. The mob's maximum speed in blocks/second is a bit over 43 times this value, but can be affected by various conditions, such as: being ridden (if a horse), sprinting, fleeing (if a passive mob), attacking (if an enderman or zombie pigman), being led by a leash, being under the effect of a Speed or Slowness potion, being a baby zombie, or being a witch and drinking a potion.
Mob generic.movementSpeed
판다 (lazy) 0.07
플레이어 0.1
판다, 플레이어 (sprinting) 0.15
random value between 0.1125 and 0.3375
당나귀, 라마, 노새 0.175
슬라임 0.2 + 0.1 * Size
, 마그마 큐브, 무쉬룸, 앵무새, 스켈레톤 말, 눈 골렘, 좀비 말 0.2
블레이즈, 드라운드, 허스크, , 좀비, 좀비 피그맨[JE 1.16 이전에만], 좀비 주민,

좀비화 피글린[차기 버전용: JE 1.16]

0.23
, 크리퍼, 엔더마이트, 철 골렘, 돼지, 북극곰, 좀벌레, 스켈레톤, 스트레이, 거북, 마녀, 위더 스켈레톤 0.25
꿀벌, 고양이, 동굴 거미, 엘더 가디언, 엔더맨, 여우, 오실롯, 토끼, 파괴수, 거미, 늑대 0.3
약탈자, 변명자 0.35
호글린[차기 버전용: JE 1.16] 0.4
소환사, 거인, 가디언, 환술사, 피글린,‌[차기 버전용: JE 1.16] 주민, 떠돌이 상인 0.5
위더 0.6
박쥐, 대구, 엔더 드래곤, 가스트, 복어, 연어, 셜커, 오징어, 열대어, 벡스 0.7
돌고래 1.2
0.7* 0.0 1024.0
generic.attackDamage[JE 1.16 이전에만]
generic.attack_damage‌[차기 버전용: JE 1.16]
Damage dealt by attacks, in half-hearts. This attribute is not found on passive mobs and golems. 1.0 0.0 2048.0
generic.armor Armor defense points. 0.0 0.0 30.0
generic.armorToughness[JE 1.16 이전에만]
generic.armor_toughness‌[차기 버전용: JE 1.16]
Armor Toughness. 0.0 0.0 20.0
generic.attackKnockback[JE 1.16 이전에만]
generic.attack_knockback‌[차기 버전용: JE 1.16]
Knockback applied to attacks. Applies only to mobs with physical attacks.[3]
파괴수: 1.5
호글린: 0.0
0.0 0.0 8.0

Attributes for players[편집 | 원본 편집]

These attributes apply to players.

Attribute Name Description Default Base Minimum Maximum
generic.attackSpeed[JE 1.16 이전에만]
generic.attack_speed‌[차기 버전용: JE 1.16]
Determines recharging rate of attack strength. Value is the number of full-strength attacks per second. 4.0 0.0 1024.0
generic.luck Affects the results of loot tables using the quality or bonus_rolls tag (e.g. when opening chests or chest minecarts, fishing, and killing mobs). 0.0 -1024.0 1024.0

Attributes for horses[편집 | 원본 편집]

These attributes apply to horses.

Attribute Name Description Default Base Minimum Maximum
horse.jumpStrength[JE 1.16 이전에만]
horse.jump_strength‌[차기 버전용: JE 1.16]
Horse jump strength in some unknown metric. 0.7* 0.0 2.0

Attributes for parrots[편집 | 원본 편집]

These attributes apply to parrots.

Attribute Name Description Default Base Minimum Maximum
generic.flyingSpeed[JE 1.16 이전에만]
generic.flying_speed‌[차기 버전용: JE 1.16]
Flight speed modifier in some unknown metric. 0.4* 0.0 1024.0

Attributes for zombies[편집 | 원본 편집]

These attributes apply to zombies.

Attribute Name Description Default Base Minimum Maximum
zombie.spawnReinforcements[JE 1.16 이전에만]
zombie.spawn_reinforcements‌[차기 버전용: JE 1.16]
Chance for a zombie to 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.

Warning: The default values for unknown attributes cause Minecraft to crash.[4]


Attribute Name Description Default Base Minimum Maximum
Any non-Vanilla Attribute name Unknown 0.0 2.2×10-308 (Double.MIN_NORMAL) 1.8×10308 (maximum.MAX_VALUE)

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 to uniquely identify the modifier.

Operations[편집 | 원본 편집]

A modifier's operation dictates how it modifies an attribute's base value. Three operations exist:

add: Saved as operation 0. Adds all of the modifiers' amounts to the current value of the attribute. For example, modifying an attribute with {Amount:2,Operation:0} and {Amount:4,Operation:0} with a Base of 3 results in 9 (3 + 2 + 4 = 9).

multiply_base: Saved as operation 1. Multiplies the current value of the attribute by (1 + x), where x is the sum of the modifiers' amounts. For example, modifying an attribute with {Amount:2,Operation:1} and {Amount:4,Operation:1} with a Base of 3 results in 21 (3 * (1 + 2 + 4) = 21).

multiply: Saved as operation 2. For every modifier, multiplies the current value of the attribute by (1 + x), where x is the amount of the particular modifier. Functions the same as Operation 1 if there is only a single modifier with operation 1 or 2. However, for multiple modifiers it multiplies the modifiers rather than adding them. For example, modifying an attribute with {Amount:2,Operation:2} and {Amount:4,Operation:2} with a Base of 3 results in 45 (3 * (1 + 2) * (1 + 4) = 45).[5]

The mathematical behavior is as follows:

  • add: Increment X by Amount
  • multiply_base: Increment Y by X * Amount
  • multiply: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount).

The game first sets X = Base, then executes all Operation add, then sets Y = X, then executes all multiply_base modifiers, and finally executes all multiply modifiers.

Vanilla modifiers[편집 | 원본 편집]

As stated before, a modifier's name can be anything, and this does not affect its behavior. The following are known modifier names and values used in vanilla Minecraft. 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.05*. For Zombie Knockback Resistance, another value between 0.0 and 0.05* is also generated. generic.followRange (Operation 1; all mobs), Knockback Resistance (Operation 0; Villagers and Zombies only)
Tool modifier Value varies based on tool and tier. generic.attackDamage (Operation 0; tridents, shovels, pickaxes, axes, hoes; UUID CB3F55D3-645C-4F38-A497-9C13A33DB5CF), generic.attackSpeed (Operation 0; tridents, shovels, pickaxes, axes, hoes; UUID FA233E1C-4180-4865-B01B-BCCE9785ACA3)
Weapon modifier Value varies based on weapon tier. generic.attackDamage (Operation 0; swords; UUID CB3F55D3-645C-4F38-A497-9C13A33DB5CF), generic.attackSpeed (Operation 0; swords; UUID FA233E1C-4180-4865-B01B-BCCE9785ACA3) (same UUIDs as Tool modifier)
Armor modifier Value varies based on slot and tier. generic.armor (Operation 0; boots - UUID 845DB27C-C624-495F-8C9F-6020A9A58B6B, leggings - UUID D8499B04-0E66-4726-AB29-64469D734E0D, chestplate - UUID 9F3D476D-C118-4544-8365-64846904B48E, helmet - UUID 2AD3F246-FEE1-4E67-B886-69FD380BB150)
Armor toughness Value varies based on tier. generic.armorToughness (Operation 0; boots - UUID 845DB27C-C624-495F-8C9F-6020A9A58B6B, leggings - UUID D8499B04-0E66-4726-AB29-64469D734E0D, chestplate - UUID 9F3D476D-C118-4544-8365-64846904B48E, helmet - UUID 2AD3F246-FEE1-4E67-B886-69FD380BB150)
Sprinting speed boost Fixed value of 0.3* used by all mobs (including players) when sprinting. generic.movementSpeed (Operation 2; all living entities; UUID 662A6B8D-DA3E-4C1C-8813-96EA6097278D)
Fleeing speed boost Fixed value of 2 used by all passive mobs when fleeing. generic.movementSpeed (Operation 2; all passive mobs; UUID E199AD21-BA8A-4C53-8D13-6182D5C69D3A)
Attacking speed boost Fixed value of 6.2* for Endermen and 0.45* for Zombie Pigmen; exists only when attacking. generic.movementSpeed (Operation 0; Endermen - UUID 020E0DFB-87AE-4653-9556-831010E291A0, Zombie Pigmen - UUID 49455A49-7EC5-45BA-B886-3B90B23A1718)
Covered armor bonus Fixed value of 20.0 for Shulker exists only when fully closed. generic.armor (Operation 0; Shulker; UUID 7E0292F2-9434-48D5-A29F-9583AF7DF27F)
Horse armor bonus Value varies based on the armor of the horse (None = 0; Iron = 5; Gold = 7;Diamond = 11) generic.armor (Operation 0; EntityHorse; 556E1665-8B10-40C8-8F9D-CF9B1667F295)
Baby speed boost Fixed value of 0.5; exists only for baby Zombies and baby Zombie Villagers. generic.movementSpeed (Operation 1; Baby Zombies; UUID B9766B59-9566-4402-BC1F-2EE2A276D836)
Drinking speed penalty Fixed value of -0.25 for Witches when drinking a potion. generic.movementSpeed (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. generic.followRange (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 generic.maxHealth, random number between 1.0 and 4.0. zombie.spawnReinforcements (Operation 0; Zombies), generic.maxHealth (Operation 2; Zombies)
Zombie reinforcement caller charge Fixed value of -0.05* created each time a zombie spawns another zombie as reinforcement. zombie.spawnReinforcements (Operation 0; Zombies)
Zombie reinforcement callee charge Fixed value of -0.05* created for each zombie spawned as a reinforcement. zombie.spawnReinforcements (Operation 0; Zombies)
effect.moveSpeed or effect.moveSpeed # (where # is the potion's amplifier) Fixed value of 0.2* when under the Speed effect, multiplied by the effect's level (amplifier + 1). generic.movementSpeed (Operation 2; All living entities; UUID 91AEAA56-376B-4498-935B-2F7F68070635)
effect.moveSlowdown or effect.moveSlowdown # (where # is the potion's amplifier) Fixed value of -0.15* when under the Slowness effect, multiplied by the effect's level. generic.movementSpeed (Operation 2; All living entities; UUID 7107DE5E-7CE8-4030-940E-514C1F160890)
effect.digSpeed or effect.digSpeed# (where # is the potion's amplifier) Fixed value of 0.1* when under the Haste effect, multiplied by the effect's level. generic.attackSpeed (Operation 2; All living entities; UUID AF8B6E3F-3328-4C0A-AA36-5BA2BB9DBEF3)
effect.digSlowDown or effect.digSlowDown# (where # is the potion's amplifier) Fixed value of -0.1* when under the Mining fatigue effect, multiplied by the effect's level. generic.attackSpeed (Operation 2; All living entities; UUID 55FCED67-E92A-486E-9800-B47F202C4386)
effect.damageBoost or effect.damageBoost # (where # is the potion's amplifier) Fixed value of 3 when under the Strength effect, multiplied by the effect's level. generic.attackDamage (Operation 0; All living entities; UUID 648D7064-6A60-4F59-8ABE-C2C23A6DD7A9)
effect.weakness or effect.weakness # (where # is the potion's amplifier) Fixed value of -4 when under the Weakness effect, multiplied by the effect's level. generic.attackDamage (Operation 0; All living entities; UUID 22653B89-116E-49DC-9B6B-9971489B5BE5)
effect.healthBoost # (where # is the potion's amplifier. May be 0.) Fixed value of 4 when under the Health Boost effect, multiplied by the effect's level. generic.maxHealth (Operation 0; All living entities; UUID 5D6F0BA2-1186-46AC-B896-C61C5CEE99CC)
effect.luck or effect.luck# (where # is the potion's amplifier) Fixed value of 1 when under the Luck effect, multiplied by the effect's level. generic.luck(Operation 0; All living entities; UUID 03C3C89D-7037-4B42-869F-B146BCB64D2E)
effect.unluck or effect.unluck # (where # is the potion's amplifier) Fixed value of -1 when under the Unluck effect, multiplied by the effect's level. generic.luck(Operation 0; All living entities; UUID CC5AF142-2BD2-4215-B636-2605AED11727)
Unknown synced attribute modifier Unknown; created when client reads attribute data sent by server. varies

History[편집 | 원본 편집]

Java Edition
1.6.113w16aAdded attributes and modifiers.
The following attributes existed: "Max Health", "Follow Range", "Knockback Resistance"; furthermore, "Jump Strength" and "Speed" existed as horse-specific attributes.
The only modifiers were both "Random spawn bonus", one used on Zombies to knockback resistance with operation 0, and the other on all mobs to follow range with operation 1.
13w17aAdded "Spawn Reinforcements Chance" attribute for Zombies.
Added "Zombie reinforcement charge" (to spawn reinforcements charge), "Random zombie-spawn bonus" (to follow range), and "Leader zombie bonus" (to both reinforcements charge and max health).
13w18aReplaced "Zombie reinforcement charge" with "Zombie reinforcement caller charge" and "Zombie reinforcement caller charge"
13w21aAttributes now can be specified in NBT.
Attributes now have IDs and corresponding translation keys.
Modifiers now display on items.
Added "Attack Damage" and made "Speed" generic.
Added "potion.moveSpeed", "potion.moveSlowdown", "potion.damageBoost", and "potion.weakness" modifiers.
Added "Sprinting speed boost", "Fleeing speed bonus", "Attacking speed boost" (for both pigmen and endermen), "Drinking speed penalty", and "Baby speed boost".
Added "Tool modifier" and "Weapon modifier".
13w23bAdded "potion.healthBoost" modifier.
1.7.213w36aAttributes/modifiers can be added to items or mobs without the use of third-party NBT editing software by adding data tags to the /give and /summon commands.
1.915w34bAdded attack speed attribute.
15w36dAdded armor attribute.
15w44bAdded luck attribute.
1.9.1pre1Added armorToughness attribute.
1.1418w43aAdded attackKnockback attribute.
차기 Java Edition
Combat Tests1.14.3 - Combat TestAdded attackReach attribute.
1.1620w14aItems and entities no longer keep unknown attributes.
Names of some attributes have been renamed to meet Namespaced ID requirements (i.e., lowercase separated by underscores instead of camel case).
Renamed generic.maxHealth to generic.max_health.
Renamed zombie.spawnReinforcements to zombie.spawn_reinforcements.
Renamed horse.jumpStrength to horse.jump_strength.
Renamed generic.followRange to generic.follow_range.
Renamed generic.knockbackResistance to generic.knockback_resistance.
Renamed generic.movementSpeed to generic.movement_speed.
Renamed generic.flyingSpeed to generic.flying_speed.
Renamed generic.attackDamage to generic.attack_damage
Renamed generic.attackKnockback to generic.attack_knockback
Renamed generic.attackSpeed to generic.attack_speed
Renamed generic.armorToughness to generic.armor_toughness.
20w17aAdded the /attribute command, which can query and change attributes.
Pocket Edition 알파
0.12.1build 1Added attributes.

References[편집 | 원본 편집]