When a mob attacks using a spear‘s jab attack, no knockback is applied to the target. This is inconsistent with:
Players correctly cause knockback with the spear‘s jab attack.
All other melee weapons used by mobs cause knockback.
Mobs correctly cause knockback with the spear‘s charged attack.
Mobs using other items (e.g., a sword) given the piercing_weapon component do apply knockback with their attack (even if the multi-hit fails, as shown in MC-305149 ).
When a spear is enchanted with Knockback, mobs do apply increased knockback, proving the enchantment system works. This confirms the bug is in the base knockback attribute of the mob‘s spear jab.
Steps to Reproduce:
Use the following command to Spawn a Skeleton holding an Iron Spear:
/summon minecraft:skeleton ~ ~ ~ {equipment:{mainhand:{id:"iron_spear",count:1b}}}Let the Skeleton attack you using its jab attack.
Observe the knockback you receive when hit.
Expected Result:
Being hit by the jab attack of a spear should apply noticeable knockback,consistent with being hit by other melee weapons.
Observed Result:
When hit by the skeleton‘s spear attack,you take damage but experience no knockback, unlike when hit by a sword or axe.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- 📓 Project Summary -- ✍️ Feedback and Suggestions -- 📖 Game Wiki