DemonBoiAnzu / ItemQualities

A plugin that adds Qualities to Items, along with the ability for the user to create their own.
MIT License
10 stars 3 forks source link

Negative Durability #13

Closed fahlur closed 2 years ago

fahlur commented 2 years ago

I noticed a tool while testing ended up having negative durability.

https://imgur.com/XiqS4Kz

I was actually testing about something some players mentioned.. Also a couple players talked about their tool nearly breaking then automatically almost full repairing.

is this suppose to occur? They did have the godly quality. But I couldnt recreate it due to the above thing I ran across while testing xD

DemonBoiAnzu commented 2 years ago

The durability display does not reflect the custom durability system, as that is impossible due to how minecraft displays that information (the Durability text with advanced tooltips enabled is what I'm talking about);

basically, the client grabs the max durability from the items type to display it's max in that text, and then it uses the items damage from it's meta and grabs the difference to display the durability left. Changing an items max durability is impossible without mods, and this is a plugin - so I had to improvise and make my own durability system.

So with this plugin the durability display is not accurate, but the green bar on the item in the inventory is accurate.

Though, it going into negatives is not intended. Thanks!

and the repairing issue.. I think I already fixed this, what version of the plugin are you on? I fixed it back in version 1.0.5. In my testing, since that patch, I have not been able to recreate that issue.

DemonBoiAnzu commented 2 years ago

I've rewritten my custom durability system, or.. more so tweaked it, found many issues and fixed them.. So thank you for raising this issue or I might not have found them lmao

Fixes will be coming in 1.0.7!

fahlur commented 2 years ago

Im currently using 1.0.6 so I can get that answer in for you. :)

1 person was with an Axe and the other was with.. uhg I think it was a fishing rod.

tbh ive been having troubles recreating it myself but both had it happen. And both are my staff and discovered it by chance and asked about it xD

they told me they were just using them as normal.

DemonBoiAnzu commented 2 years ago

Strange, hopefully it will be fixed with my tweaks to my durability system. Can't really say for sure, though, since I'm also unable to recreate it what so ever.

1.0.7 is huge right now, along with so many changes and fixes, and one massive addition. I'm hoping to release it soon. I do need someone to test it out and find any possible issues, if you're interested add me on discord: Abraxas#1964

fahlur commented 2 years ago

After updating I will keep my eyes out with some testing and such, also I have informed them if it happens again to give me the clearest info that can give me that led to it, as well preferably a timestamp so I can see if a log showed at all in case as well.

kvakkvak commented 2 years ago

Also happend to me with Axe and Trident that they healed to full hp

fahlur commented 2 years ago

thats alright, I was just told my a staff member on my server when they got done "netheriting up their gear" I presume they mean converting their stuff to netherite, all the enchants disappeared and the quality changed. I'm asking them more questions to clarify the situation with it. Because I want this successful and I want to make sure things get caught for our friend here :). So its noted here, but once I get proper clarification and able to test it (hopefully recreate it) ill make a ticket for it.

thats what I got out of the comment, heres what they actually said btw

welp i was finishing up netheriting my gear and it dischanted (my hoe axe and shovel) and downgraded the quality on my shovel

I dont think it "downgraded" I think it probably just changed random the quaity.

Maybe check to see if changing to netherite from diamond changes the nbt? I dont think it does but probably should check. Ill look into the data command in game to check see if it updates properly and report when I get a chance.

DemonBoiAnzu commented 2 years ago

Do you have applyQualityOnCraft enabled?

If so, Smithing counts as crafting, so that's why the Quality was rerolled. I wrote it like so;

quality on craft disabled: Result of smithing will get the same quality as the input item if it has one. quality on craft enabled: Result of smithing will get its quality rerolled - since you're technically still crafting, the idea I had in mind is your character either just made a bad quality upgrade, or a better quality one.

I could remove this, since it seems to be causing confusion.

As for the item not retaining it's enchantments, that was a bug, my bad! I've just fixed it.

DemonBoiAnzu commented 2 years ago

Okay I have rewritten the Quality application for Smithing. As well as added a new config option to toggle whether the result items Quality will be rerolled or not. (true - reroll, false - result will get the same quality as the input item)

The enchantments not carrying over has also been fixed up.

DemonBoiAnzu commented 2 years ago

Fixed in release 1.1.0!