mojira.dev
MC-303161

Spears can still attack entities when a player's attack damage attribute is less than 0

When attacking with a spear while your attack_damage attribute is less than 0, spear attacks still deal knockback against enemies, instead of being unable to attack as is the case with other melee attacks, and lunge attacks are completely unaffected by attributes.

  • Steps to reproduce the issue:
    1. Set attack_damage attribute to a number below 0 (low enough to where attacking with a spear should deal 0 damage)
    2a: Attack an entity
    2b: Charge at an entity

  • Expected result
    a & b: The attack should not affect the entity in any way

  • Actual result
    a: The attack deals knockback and causes the entity to flash red, signalling an attack, however no damage is dealt
    b: The attack deals damage against the enemy regardless of attack_damage attribute value

Linked issues

Comments 2

That’s why it was acting so weird !

Thank you for your report!
We're tracking this issue in MC-302778, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
πŸ““ Bug Tracker Guidelines – πŸ’¬ Community Support – πŸ“§ Mojang Support (Technical Issues) – πŸ“§ Microsoft Support (Account Issues)
πŸ““ Project Summary – ✍️ Feedback and Suggestions – πŸ“– Game Wiki

Victor Lanoix-Warrer

(Unassigned)

Unconfirmed

(Unassigned)

25w42a

Retrieved