Apothic Attributes (AttributesLib)

Apothic Attributes (AttributesLib)

11M Downloads

Can't land full-strength attacks if Cold Damage + Fire Damage > target's HP or Current HP Damage ≥ 100%

James103 opened this issue · 0 comments

commented

If the value of the attribute "Cold Damage" plus the value of the attribute "Fire Damage" is greater than the mob's health, or if the value of the attribute "Current HP Damage" is greater than 100% (assuming no defense on the target), attempting to land a hit on that mob will cause the hit itself to land at zero strength, preventing critical and sweep attacks from working properly.

To reproduce:

  1. Create a new world.
  2. Summon a renamed slime with 1 HP: summon minecraft:slime ~ ~ ~ {Size:0,CustomName:'"A"'}
  3. Make sure Cold Damage, Fire Damage, and Current HP Damage are all 0.
  4. Try to hit the slime normally.
  5. The attack goes through with the correct attack strength.
  6. Run the command: attribute @s attributeslib:cold_damage base set 2, then summon another slime (step 2).
  7. Try to hit the slime again.
  8. The attack goes through at 0% strength (critical hits and sweeps don't work).
  9. Run the command: attribute @s attributeslib:cold_damage base set 0.
  10. Run the command: attribute @s attributeslib:fire_damage base set 2, then summon another slime (step 2).
  11. Try to hit the slime again.
  12. The attack goes through at 0% strength (critical hits and sweeps don't work).
  13. Run the command: attribute @s attributeslib:fire_damage base set 0
  14. Run the command: attribute @s attributeslib:current_hp_damage base set 1, then find any mob such as a cow, pig, villager, or Iron Golem.
  15. Try to hit that mob.
  16. If the mob had no defense, the attack goes through at 0% strength (critical hits and sweeps don't work)

See also:

public void meleeDamageAttributes(LivingAttackEvent e) {

Tested on: Minecraft 1.20.1, Apothic Attributes 1.2.1, Placebo 8.6.1