kernitus / BukkitOldCombatMechanics

Spigot plugin to configure combat mechanics from 1.9 onwards
https://www.spigotmc.org/resources/19510/
Mozilla Public License 2.0
168 stars 71 forks source link

Players take no damage when pvping #560

Closed zDragonS2 closed 1 year ago

zDragonS2 commented 2 years ago

Problem Description

At the time of pvp the players do not receive any type of damage. When I disable the "old-strength-armor" option, players die from 1/2 hits. I would like to make the pvp last longer but take damage

kernitus commented 2 years ago

I'm gonna be needing an actual debug log with the damage being done and received on both sides to even have a clue what the problem might be. Please enable debug mode in the config.

DotDebian commented 2 years ago

Hey @kernitus ,

I just had the same issue. I'm running 1.14.4 paperspigot with the latest plugin version, without anything else. Default config by the way.

I enabled debug:

[19:17:56] [main/INFO]: [CHAT] [Debug] Raw damage: 10.0
[19:17:56] [main/INFO]: [CHAT] [Debug] 0/9.0 last: 1.0
[19:17:56] [main/INFO]: [CHAT] [Debug] Mob: 0.0 Sharpness: 3.0
[19:17:56] [main/INFO]: [CHAT] [Debug] No ench damage: 7.0
[19:17:56] [main/INFO]: [CHAT] [Debug] Strength Modifier: 0.0
[19:17:56] [main/INFO]: [CHAT] [Debug] Weakness Modifier: 0.0
[19:17:56] [main/INFO]: [CHAT] [Debug] Base tool damage: 7.0
[19:17:56] [main/INFO]: [CHAT] [DEBUG][ModuleOldToolDamage] Old DIAMOND_SWORD damage: 7.0 New tool damage: 8.0
[19:17:56] [main/INFO]: [CHAT] [DEBUG][ModuleOldToolDamage] Old sharpness damage: 3.0 New: 6.25
[19:17:56] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Base: 8.0
[19:17:56] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Weak: 0.0
[19:17:56] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Strength level: 0
[19:17:56] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Strength: 0.0
[19:17:56] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Mob 0.0 Sharp: 6.25
[19:17:56] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] New Damage: 14.25
[19:17:59] [main/INFO]: [CHAT] <DqwnZ_> without modifier
[19:18:14] [main/INFO]: [CHAT] <Aizhyx> Je vois mais avec ton pl les logs spam xD
[19:18:32] [main/INFO]: [CHAT] [Debug] Raw damage: 10.0
[19:18:32] [main/INFO]: [CHAT] [Debug] 0/9.0 last: 1.0
[19:18:32] [main/INFO]: [CHAT] [Debug] Mob: 0.0 Sharpness: 3.0
[19:18:32] [main/INFO]: [CHAT] [Debug] No ench damage: 7.0
[19:18:32] [main/INFO]: [CHAT] [Debug] Strength Modifier: 0.0
[19:18:32] [main/INFO]: [CHAT] [Debug] Weakness Modifier: 0.0
[19:18:32] [main/INFO]: [CHAT] [Debug] Base tool damage: 7.0
[19:18:32] [main/INFO]: [CHAT] [DEBUG][ModuleOldToolDamage] Old DIAMOND_SWORD damage: 7.0 New tool damage: 8.0
[19:18:32] [main/INFO]: [CHAT] [DEBUG][ModuleOldToolDamage] Old sharpness damage: 3.0 New: 6.25
[19:18:32] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Base: 8.0
[19:18:32] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Weak: 0.0
[19:18:32] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Strength level: 0
[19:18:32] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Strength: 0.0
[19:18:32] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] Mob 0.0 Sharp: 6.25
[19:18:32] [main/INFO]: [CHAT] [DEBUG][EntityDamageByEntityListener] New Damage: 14.25
[19:18:37] [main/INFO]: [CHAT] <DqwnZ_> oui jsais

With or without the old-strength-armor, same debug. But without, we die of 13 hits, with the module enabled we don't lose any hearth.

We're both on a diamond suit, Protection IV, Unbreaking III, with diamond swords Sharpness V, Unbreak. III, Fire Aspect II.

Probably same as #557, #589

DotDebian commented 2 years ago

Update: logs were from the attacker's PoV. From the attacked player, we get this: image As you can see, the final damage is too small to be deducted.

kernitus commented 1 year ago

@DotDebian @zDragonS2 please try the new test builds, where I have rewritten most of the calculations that deal with damage.

kernitus commented 1 year ago

Closing due to rewrite of all damage calculation code. Please open a new issue with debug logs from the latest version if you think the issue is still present.