YufiriaMazenta / Craftorithm

Advanced recipe management system for minecraft server
https://yufiriamazenta.gitbook.io/craftorithm-wiki/
GNU General Public License v3.0
62 stars 4 forks source link

Custom Recipes not working due to item having extra NBT data. #74

Open Tudorhc5 opened 4 days ago

Tudorhc5 commented 4 days ago

Describe the bug | 描述你遇到的bug

Create a custom recipe involving Enchanted Books Under their vanilla max enchantment level. If you get them out of creative, or buy them from a villager, they have less NBT than if you get the enchanted book by upgrading in an anvil. (Place in anvil any 2 enchanted books at least one level under it's max, to get the next level) (ex: Sharpness IV + Sharpness IV will equal Sharpness V.

The books you get from a villager or creative tab, will look like this: (Let's call this Variant A) variant_a

The books you get from upgrading enchanted books in anvil look like this: (Let's call this Variant B) variant_b

For some reason minecraft adds this extra "repair_cost" nbt.

Steps to reproduce the bug | 复现此Bug的步骤

  1. Create a custom recipe using books Variant A
  2. Try to use the custom recipe with books obtained thru Variant B
  3. Observe that the plugin does not recognize the item as part of the recipe.

Server version | 服务器版本

Folia 1.21.1-R0.1 - SNAPSHOT -

Craftorithm Version | Craftorithm的版本

Plugin Version: 1.10.10-20240913

FULL server log | 完整服务器日志

Not relevant

Other files, you can drag and drop them here to upload | 其他文件,你可以拖拽文件到这里上传

Not relevant

Images | 相关图片

https://imgur.com/a/gNqkhQA

YufiriaMazenta commented 3 days ago

There is no good solution to this at the moment.