-
Bug
-
Resolution: Unresolved
-
None
-
1.21.4
-
None
-
Community Consensus
-
Commands, Mob behaviour
-
Low
-
Platform
The Bug
Mobs with an attack damage of 0 will still attempt to attack their target. When targeting a player, it is unable to cause any hit ticks at all. However, when hitting a non-player entity (such as an iron golem), it will still cause that mob to flash red and have a hurting sound, despite taking no damage.
To Reproduce
Summon a husk or any hostile mob that uses melee attacks with an attack damage of 0, and any mob that this hostile mob would attack. Observe that it can still give it hit ticks, but it will not deal any damage. Let the hostile mob try to attack you. Observe that it does not give any hit ticks.
Commands:
Summon a husk with an attack damage of 0 and resistance so it won't die:
/summon husk ~ ~ ~ {active_effects:[{id:"minecraft:resistance",amplifier:5,duration:-1}],attributes:[{id:"minecraft:generic.attack_damage",base:0}]}
And summon an iron golem for the husk to attack:
/summon iron_golem ~ ~ ~
And let the husk attack the iron golem