H7KZ / Disenchantment

New mechanics for minecraft vanilla gameplay. This plugin allows players to disenchant items and get the item's enchantments back.
https://www.spigotmc.org/resources/110741
1 stars 2 forks source link

repaircost #2

Closed Timokaproka closed 8 months ago

Timokaproka commented 9 months ago

I apologize in advance for the possibly clumsy translation, because I do not know English and use a translator. When removing the enchantment from an item, the NBT-tag "repaircost" remains on it, which makes all subsequent actions with this item more expensive. I really want to add a function to config with which you can reset the repaircost when removing enchantments from item

H7KZ commented 9 months ago

Sure thing, I will get in it soon as I can. Currently I am in a bit of a rush with school and work.

H7KZ commented 9 months ago

It is done. Feel free to leave a review and some more feedback! Thanks! Have a great day!

Timokaproka commented 9 months ago

This function does not work. The plugin is enabled, the server runs on the Paper 1.16.5 core, there are no other plugins.

https://github.com/H7KZ/Disenchantment/assets/80510345/a8ea362b-45ef-4f0e-8f57-a46276d7fab1

H7KZ commented 9 months ago

Interesting behaviour since I fixed similar issue before that the items do not clear... and well that repair cost I am setting it to 0 so it shouldn't add any :/ Give me few days

H7KZ commented 8 months ago

@Timokaproka I finally found some time and looked at it. The repair cost in your video is from the enchantment you put on and not from the "disenchantment" and also the look a like dupe isn't from my plugin, the plugin exits well before. Even tho I found a small mistake that I wasn't setting the repair cost to 0 on normal use case, thats your case without any eco or excellent enchants. On this I will be pushing new version. Please do more testing, I didn't find any other mistake on my end. Thank you.

Timokaproka commented 8 months ago

@H7KZ If an item is enchanted, the RepairCost will increase regardless of the enchantment level by the formula x * 2 + 1. Where x is the initial "RepairCost". That is, 1 --> 3 3 --> 7 7 --> 15 and so on.

When you remove enchantments from an item (such as a stone sword), it still has a "RepairCost" value that should be reset to 0. That is, "RepairCost: x" (x is any number) --> "RepairCost: 0".

H7KZ commented 8 months ago

ok, now it should work. There is a new config option "enable-repair-reset" with true it resets the repair cost down to 0