WolfyScript / CustomCrafting-Wiki

Wiki and JavaDocs for CustomCrafting
https://www.spigotmc.org/resources/55883/
9 stars 3 forks source link

Exp being used in anvil, then being refunded as soon as new exp from external source is given #77

Closed xwenx672 closed 2 years ago

xwenx672 commented 2 years ago

Describe the bug I have a bunch of recipes that requires levels to be spent in an anvil to create the item, however users have found and are abusing the fact that for some reason, when you create any item that costs exp to create inside of an anvil, the levels will get spent, however as soon as you get more expm your levels reset back to what they were before spending the exp.

To Reproduce Steps to reproduce the behavior:

  1. Create a crafting recipe that requires any amount of exp to make (less than 40 or too expensive).
  2. In survival make the item using the custom crafting recipe just made (ensure you have some levels to use for the creation).
  3. Kill a mob to gain some exp back and you will gain all of your exp back that you just spent to gain the item from the crafting recipe.

Expected behavior I expected for the exp to not be able to be given back to the person who created the item using the crafting recipe which required levels for the item to be crafted.

Server (please complete the following information): Version: 1.17.1 Server Java Version: 16

Additional context

  1. Server has 16 other plugins being used in conjunction with it. However I also tested this on a local server with just customcrafting and wolfie's utils installed and still had the issue as mentioned above.
  2. For the time being I will have to change my server to using the crafting bench only.
WolfyScript commented 2 years ago

Just tested it and I can confirm the levels are reset. I am further looking into it to find the cause.