Unlike other physical mob attacks (like standard melee or spear charges), spear jabs by mobs do not deal any knockback to the target. This is also unlike player spear jabs, which deal knockback.
Steps to Reproduce:
Summon a mob which can do spear jab attacks (skeleton, drowned, etc.) holding a spear in their main hand.
Allow the mob to attack a player or mob that has no/very low knockback resistance and observe when the target is attacked.
Expected Result:
The mob’s spear jabs deal knockback to the target, like any other physical attack.
Actual Result:
The mob’s spear jabs do not deal any knockback to the target.
I have attached a video below showcasing the bug. Note: I gave myself resistance so I could more easily showcase it.
Attachments
Comments 2
There is a difference in Snapshot 6.
Mob jabs go through Mob#doHurtTarget but player jabs go through PiercingWeapon#attack and LivingEntity#stabAttack with dealsKnockback set to true.
minecraft:spear is also present inside data/minecraft/tags/damage_type/no_knockback.json, so the mob path skipsand never uses the piercing weapon's knockback flag.
Thank you for helping us improve Minecraft! We saved your files: