Closed Illustive closed 1 week ago
Hello, I'll take a look in the weeks coming, I'm actually in vacation, thanks for the report :D
The issue is a bit strange, I'll try doing debugging
i have the same on my server any solutions?
This is still occuring in the latest version ? I thought it fixed that
I have the version from modrinth is there a newer version git hub or anywhere else I can try? If not I will try and reinstall and tell you if it still happens.
i just reinstalled the latest version and still have this spamming the logs and it not always working
[12:14:56] [Server thread/WARN]: [BetterMending] Global task for BetterMending v2.6.4.1 generated an exception java.lang.IllegalArgumentException: Damage cannot be negative at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) ~[guava-32.1.2-jre.jar:?] at org.bukkit.craftbukkit.inventory.CraftMetaItem.setDamage(CraftMetaItem.java:1634) ~[purpur-1.21.1.jar:1.21.1-2297-ef12ede] at BetterThanMending-2.6.4.1 (1).jar/io.github.paulem.btm.damage.NewerDamage.setDamage(NewerDamage.java:22) ~[BetterThanMending-2.6.4.1 (1).jar:?] at BetterThanMending-2.6.4.1 (1).jar/io.github.paulem.btm.managers.RepairManager.repairItem(RepairManager.java:88) ~[BetterThanMending-2.6.4.1 (1).jar:?] at BetterThanMending-2.6.4.1 (1).jar/io.github.paulem.btm.managers.RepairManager$1.run(RepairManager.java:58) ~[BetterThanMending-2.6.4.1 (1).jar:?] at BetterThanMending-2.6.4.1 (1).jar/io.github.paulem.btm.libs.universalScheduler.foliaScheduler.FoliaScheduler.lambda$runTaskTimer$2(FoliaScheduler.java:65) ~[BetterThanMending-2.6.4.1 (1).jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[purpur-1.21.1.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[purpur-1.21.1.jar:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1766) ~[purpur-1.21.1.jar:1.21.1-2297-ef12ede] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:513) ~[purpur-1.21.1.jar:1.21.1-2297-ef12ede] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1635) ~[purpur-1.21.1.jar:1.21.1-2297-ef12ede] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1335) ~[purpur-1.21.1.jar:1.21.1-2297-ef12ede] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:334) ~[purpur-1.21.1.jar:1.21.1-2297-ef12ede] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
That's really strange, with which item it does that ? At which durability ?
I don’t know as I just run the server for my friends an they have mending on everything I can do some tests to find out tomorrow as I am busy but apparently it stops working then randomly starts again
That's really strange, your help would really be cool x) There might be something bad in the formula I use, I'll check the original code again, maybe he did a bug fix
as far as i can tell on the latest version of purper it happens between max durability-2 and -5 also i have seen that when the error is being shown when you disable btm it doesn't actually stop it continues to try and repair i don't know if this helps at all but will continue to test when i have time also if you change the ratio to 1.0 or change the xp to 10 it works i don't do much java coding so cant help with the coding but i think that the xp change doesnt affect much to do with the xp to durability ratio feel free to tell me if that is wrong
you're right so you reach -2 and -5 durability ? pretty strange that it's damaging instead of repairing... logically, it keeps activated if you disable btm without restarting the server
I'll take a look after this night, seems really strange
Just for clarification when any item reaches 2 less than the max durability the error occurs but then when the item continues to be used once it hits 5 less the error stops and it gets repaired
wtf
I'll fix that, I think I know from where the error comes
okay, basically it does 2 - 4, which is negative
So I need to clamp the max damage remover to the itemDamages, I think
Okay, maybe it'll be fixed with 0f0573b07c462d77568c46528d462df1e0eba61c I keep this issue opened for now, just try the latest version when it'll be released
The latest is now on Modrinth and Spigot ❤️, thanks for your report :D
Ok thanks for the fast fix I will update it on the server and see if I get any errors hopefully not
Okay perfect, tell me if it's good or not 😉 Thanks for your help :D
hi sorry for the long wait i have been busy with my new school it seems to be working as i have had no errors and no complaints so you can mark it as closed at least for me
Perfect, no problem I have a new school too