mojira.dev
MC-47091

Slimes, Magma Cubes, Ocelots, and Iron Golems don't use generic.attackDamage Attribute

The bug

Slimes, Magma Cubes, and Iron Golems fail to use the generic.attackDamage attribute properly, meaning that their attack damage cannot be altered via commands or potions. This is the cause behind MC-5164 and MC-9600, and may also be related to MC-33285.

As a result, the following command will only work properly for melee-capable mobs which aren't affected by this bug:

summon MOB_TYPE_HERE ~ ~1 ~ {Attributes:[{Name:"generic.attackDamage",Base:10D}]}

Most melee-capable mobs, such as zombies, will deal exactly 5 hearts per hit on Normal difficulty. The mobs affected by this bug will instead deal their usual damage.

In addition, Strength and Weakness potions have no effect on these mobs.

Steps to Reproduce

  1. Spawn a slime, magma cube, or iron golem (don't use a golem built manually from blocks; they don't become aggressive).

  2. Allow it to attack you, and take note of the damage dealt.

  3. Splash it with Strength II, or any desired level of Strength or Weakness.

  4. Observe that the damage dealt is the same as before.

Technically this issue also applies to the Ender Dragon, but essentially no potion effects or attributes work on the dragon anyhow.

Affected entities

Affected entity

Note

slime

magma_cube

ocelot

attacking chicken

villager_golem

Related issues

Comments

migrated

confirmed

migrated

Still relevant in 1.8.1-pre2, and also affects Killer Bunnies.

migrated

Also with Zombie / Skeleton

migrated

Actually, sometimes is does partly work

marcono1234

Confirmed for Slimes for

  • 1.8.5 probably caused by the fact that their Size tag determine Health and AttackDamage (and it gets applied after the attributes are set by the command)

migrated

Seems to be fixed except for Slimes.

migrated

Confirmed in 15w43c

/summon VillagerGolem ~ ~1 ~ {Attributes:[{Name:generic.attackDamage,Base:-10}],ActiveEffects:[{Id:18,Amplifier:255,Duration:199980}]}

/effect @e[type=VillagerGolem] minecraft:weakness 1000 255 true
migrated

Confirmed for 16w04a.

migrated

Confirmed for 16w05a

migrated

Confirmed for 16w05b

migrated

Confirmed for 1.9-pre1 and 1.9-pre2

SunCat

Still in 1.9.1-pre3, fixed for wolves

SunCat

Still in 1.9.3-pre3

elrichmc

Still in 1.10.2, tested with slimes.

migrated

In the latest snapshot, 16w42a, the damage is still the same when following the instructions posted. Yet when using the command

summon MOB_TYPE_HERE ~ ~1 ~ {Attributes:[{Name:"generic.attackDamage",Base:10D}]}

they do not attack any harder than normal, YET when I attack them, they produce what looks to be 5 full hearts or so of damage, and no matter the size, they will not die on the first hit (I hit a tiny slime and it produced the large amount of hearts, and did not die when I hit it), upon hitting them again they will go back to normal behavior, of course still not dealing any extra damage to me (yes I tested it on a slime that could deal damage to me as well)

marcono1234

Wolves are no longer affected in 1.11, keep in mind that their attack damage resets when they are tamed

Jayceebee

Confirmed for 1.12.1

qwerty23495

Does this still affect the current versions of Minecraft? (1.12.2, 1.13-pre3). If so, please update the ticket accordingly.

migrated

Confirmed for minecraft:iron_golem with 20D (doesn't kill you in one hit while zombies do)
In 1.13-pre5 by the way..

migrated

Confirmed for 1.13.1.

migrated

Confirmed for 1.13.2

YourCoal

Still an issue for 1.14, 1.14.1, and 1.14.2 versions.

migrated

Still persists in 1.19.2

migrated

Magma cubes, post-fix, are tracked in MC-165508.

migrated

migrated

Confirmed

(Unassigned)

attributes, damage, health, iron_golem, magma_cube, ocelot, potion-effect, slime, strength, weakness

Minecraft 1.7.4, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.7.6-pre1, ..., Minecraft 1.12.2, Minecraft 1.13-pre5, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 1.14.2

19w35a

Retrieved