Closed purejosh closed 2 years ago
Strange. Anyway there is no "caching" of any type. Durability is removed each time a block is broken.
I'll try to reproduce the issue and tell you what is the reason of this behaviour
I cannot reproduce the issue, but I found two problems in my code:
I fixed both of them, now it will work like a vanilla item (unbreaking formula).
Terms
Discord tag (optional)
purejosh#2047
What happened?
Tools with unbreaking III can have a lag when calculating durability. For example, I was using the diamond hammer with unbreaking III, and unbreaking was working normally for a few swings. After the 4th usage, the durability went down 41 points. This resulted in a member of my server losing his diamond hammer, which is very expensive in my server. Keep in mind, this tool has been configured to break 3x3x1 on my server, so 9 durability should be used when unbreaking doesn't absorb the durability loss. It seems to have cached the durability loss in the background, and when unbreaking wasn't doing its job that break cycle, it resulted in a massive loss of durability. As if it were storing the blocks broken in the background, but only applied them to the hammer's durability when it didn't get saved by unbreaking.
Steps to reproduce the issue
1, Equip diamond hammer with unbreaking III, configure item to break more than 1 block. (3x3x1 in my case, but 3x3x3 would be even more noticeable)
Server version
1.18.1
ItemsAdder Version
2.5.0-beta
ProtocolLib Version
4.8.0-SNAPSHOT-b538
LoneLibs Version
1.0.16b
LightAPI Version (optional)
No response
LibsDisguises Version (optional)
No response
FULL server log
Nothing related to the bug is located in the server log.
Error (optional)
No response
ItemsAdder config.yml
Problematic items yml configuration file (optional)
Other files, you can drag and drop them here to upload. (optional)
No response
Screenshots/Videos (you can drag and drop files or paste links)
No response