Laarryy / AdvancedEnchantments

Better Enchantments & Curses
MIT License
4 stars 7 forks source link

Proficiency doesn't conflict with Mending #27

Closed TotallyNotGuy closed 4 years ago

TotallyNotGuy commented 4 years ago

Plugin version: Latest commit as of 2/6/2020 Server type: Paper Server version: 1.15.2

Describe the bug Proficiency can be combined with Mending in an anvil.

Expected behavior The code makes it at least look like Mending is supposed to be incompatible with Proficiency so both can't be on the same item in vanilla survival.

To Reproduce

  1. Install the plugin
  2. Start the server
  3. Obtain an item with Proficiency
  4. Obtain another item with Mending
  5. See that they combine in an anvil correctly

Plugins A lot, but ProtocolLib historically has been the only one that ever caused AE issues.

Screenshots/Video If applicable, add screenshots/videos to help explain your problem.

Additional context I really just want to have the ability to add vanilla enchants as conflicts for balance...

egg82 commented 4 years ago

Thanks for the report! Should be fixed in the next version

TotallyNotGuy commented 4 years ago

Sadly, this didn't actually fix it :( Turns out the actual fix was really easy though. Tried building off latest commit and still didn't actually register any conflicts, but just adding "PROFICIENCY.conflicts.add(MENDING);" to BukkitEnchantment.java actually did the trick (since when checking AE enchant conflicts it seems to only check if the vanilla enchant is a conflict for the AE enchant not the other way around) image image image image (don't mind the extra logging output) Thanks!

egg82 commented 4 years ago

While that's a solution, needing to adding conflicts to both enchants means there's an underlying issue. And, indeed, there was. 745abe8 should fix this issue.