Unbreaking not working when Old Durability is enabled
27chandler opened this issue · 10 comments
Information
- Server Version: PaperMC 1.15.2
- OldCombatMechanics version: 1.8
- Server Log File: https://pastebin.com/czQZaANR
- OldCombatMechanics config file: https://pastebin.com/wvR8uQXB
Problem Description
When the old durability module is enabled unbreaking is ignored when calculating durability decrease.
To Reproduce
Steps to reproduce the behavior:
- Enable Old Durability in Config
- Log in with 2 accounts
- Equip account 1 with a piece of armour with unbreaking 3 on it
- Get account 2 to hit them 10 times
- Check armor durability amount
Expected Behaviour
Normally the durability should go down by some randomly selected amount between 0 and 10 due to unbreaking being on the armour piece. (With the randomness of the durability decrease differing depending on the unbreaking level)
Actual Behaviour
The durability goes down by exactly 10, meaning the unbreaking enchant is being fully ignored
After some extra testing I've found that elytras no longer have unbreaking affecting them at all with the newest version.
I did not find this to be the case, as the plugin was recalculating the unbreaking probability and applying it itself. However, I have made OCM ignore Elytras in the module entirely, as the maximum damage they'd receive would always be 1 anyway.
I’m absolutely sure that this is caused by this plugin, because many players noticed this, and removing the plugin solved the problem.
I’m absolutely sure that this is caused by this plugin, because many players noticed this, and removing the plugin solved the problem.
Yes that's why there's a Github issue open for it. It's also already been fixed in the development versions.
Is there a build solving it please ? Le lun. 29 juin 2020 à 16:43, kernitus [email protected] a écrit :
I’m absolutely sure that this is caused by this plugin, because many players noticed this, and removing the plugin solved the problem. Yes that's why there's a Github issue open for it. It's also already been fixed in the development versions. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#390 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJ74ONSWI2KROYETZF5Y3DRZCR7LANCNFSM4NF4TJXA .
-- Louis
Just to add to this, I haven't tested but I know thorns also affects armour durability. So that might have been forgotten too
Ok @27chandler I have added a calculation for unbreaking based on the formula shown here if you'd like to test it.
Unfortunately, working out durability with thorns is quite a bit more complicated as it involves knowing if the thorns enchantment was used, and then applying the durability reduction to a random piece of armour. That may even require integrating this module with some of the other ones.