GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
138 stars 61 forks source link

Anvil destroys books instead of denying illegal book + item combinations. #4313

Closed BigScary closed 4 weeks ago

BigScary commented 1 month ago

Describe the bug

Note this is a resubmit after updating Paper/AE, so maybe it looks familiar.

I have made a few enchantments which apply narrowly to very specific items, like "golden chestplate" or "shield". When players try to apply enchantment books to the wrong items, the anvil allows them to finish the transaction (bad) and neither applies the enchantment (good) nor returns the book (bad).

For what it's worth, the preview of the finished item in the anvil UI does NOT show the enchantment added. But nonetheless my players are overlooking that detail surprised/sad about losing their books this way.

How to reproduce

ward: display: '%group-color%Ward' description: A chance to absorb enemy damage applies-to: Armor type: DEFENSE;DEFENSE_MOB group: UNIQUE applies:

Define above enchantment. Give yourself a book with this enchantment and a netherite breastplate. Place both in anvil UI. Complete anvil transaction. Expected: Can't complete transaction because you have a netherite breastplate, while the enchantment is defined as applying to only golden chestplates.

Actual: Transaction completes, book is destroyed, item seems unchanged.

Screenshots / Videos

No response

"/ae plinfo" link

https://paste.md-5.net/ijaruyajab

Server Log

No response

ArmonicPvP commented 1 month ago

This happens for me as well on latest version

ThomasWega commented 1 month ago

Could one of you please provide a video showcase?

ArmonicPvP commented 4 weeks ago

This isn't an issue anymore for me with the latest version it seems