mojira.dev
MC-302778

Strength, Weakness and any other attack_damage attribute modifiers do not impact damage dealt by spears when performing charge attacks

When using the spear weapon’s charge attack with the strength effect, the damage output is unaffected regardless of the level of strength the player using the spear has.
Even when using commands to acquire a strength level of 255, the spear’s charge attack damage remained the same on average throughout tests.

Note: In technical terms, this issue affects any item with the kinetic_weapon component.

How to reproduce:

This issue can be reproduced by applying the Strength and Weakness effects, but these steps are the easiest way to visualize the bug’s impact.

  1. Execute the following command:

    /attribute @s minecraft:attack_damage base set 1000
  2. Summon a warden.

  3. Punch it.
    -> ✔ The warden dies.

  4. Give yourself any kind of spear.

  5. Summon another warden.

  6. Perform a charge attack on it with the spear.
    -> ❌ The warden doesn’t die.

Expected result:

The Strength and Weakness effects and any changes to the attack_damage attribute would affect damage dealt by spear charge attacks.

Observed result:

The Strength and Weakness effects and any changes to the attack_damage attribute do not affect damage dealt by spear charge attacks.

Linked issues

Comments 3

Spear charge attacks now respect the player’s base (not total) attack damage in 25w43a, so using /attribute @s minecraft:attack_damage base set 1000 allows you to kill the warden in one hit as expected.

However, giving yourself strength or a spear with an attribute modifier with the below commands still does not work:

/effect give @s minecraft:strength infinite 127 true
/give @s minecraft:wooden_spear[minecraft:attribute_modifiers=[{id:"a",type:"attack_damage",operation:"add_value",amount:1000}]]

Additional tests for game version 1.12.11 Pre-Release 2 where the bug is still present.

Using a Netherite Spear as a point of compression we deal 7 damage when running directly at the target. Below are the various cases where the damage increases/decreases as expected.

Attribute Commands:

/attribute @s minecraft:attack_damage modifier add dmg 10 add_value
/attribute @s minecraft:attack_damage modifier add dmg 10 add_multiplied_base
/attribute @s minecraft:attack_damage modifier add dmg 10 add_multiplied_total
All of the following above deal 7 damage instead of increasing damage as expected.

/attribute @s minecraft:attack_damage base set 10
This deals 16 damage as expected.

Potion Effects:

/effect give @s minecraft:strength infinite 1 true
/effect give @s minecraft:weakness infinite 1 true
All of the following above deal 7 damage instead of increasing/decreasing damage as expected.

Sharpness Enchantment:

/give @s minecraft:netherite_spear[enchantments={sharpness:10}]
This deals 12.5 damage as expected.

Currently only enchantments and base attribute affect damage, but modifiers do not in version 1.12.11 Pre-Release 2

Wanton Con

(Unassigned)

1501068

Confirmed

Expansion A

Normal

(Unassigned)

25w41a, 25w44a, 1.21.11 Release Candidate 1

Retrieved