Giving a minecraft:piercing_weapon causes attack cooldown damage penalty to be ignored. This also still happens when using the minimum attack cooldown component (default is 0), for example setting that component to 0.5 allows attacking at only 50% charge, but the damage is still the same as 100% charge.
Example command: /give @s minecraft:trident[minecraft:swing_animation={type:stab,duration:20},minecraft:piercing_weapon={min_reach:0,max_reach:3,sound:"item.trident.hit",hit_sound:"item.trident.throw"},minecraft:minimum_attack_charge=0]
Please rename this report. It is unrelated to the
minecraft:minimum_attack_chargecomponent, rather, this issue arises as thestabAttack()method itself ignores attack cooldown as it is both:Unnecessary for the Spear’s jab attack.
Used for the Spear’s charge attack.
The solution to this, in theory, is adding a parameter to
stabAttack()for attack strength scale, and providing the attack strength scale as one inKineticWeapon, and the actual player attack strength scale inPiercingWeapon