Bug with Enigmatic Legacy (and any other mods that restrict unequippability of their curios')
Aizistral opened this issue ยท 0 comments
Convenient Curios container version
1.1-1.18
Forge version
40.0.45
Additional mod(s) version (If bug is due incompatibility)
Enigmatic Legacy 1.18.2 (or any other mod with restrictions on unequippability of its curios)
Describe the bug
Curio swap functionality of Curios Container completely ignores whether or not the curio which is already in the slot is, in fact, unequippable. The reason this happens is because mayPlace
check in CurioSlot
does not ensure that the item already in the slot can be removed from it, only that the item passed as argument can indeed be placed there, as if the slot was empty:
...as this is the only check performed on curio slot when swapping, the result is that regardless of what curios'
canUnequip
method says the item in the slot will be forcibly displaced.
Steps to reproduce
- Enter the world;
- Equip the curio in one of your curio slots that does not permit the player to freely unequip it (say, Ring of the Seven Curses from Enigmatic Legacy);
- Open Curios Container;
- Use curio swap feature to try and displace supposedly unequippable curio from its slot;
- Witness!
Crashlog
Not applicable.
Additional context
This can be easily fixed by doing mayPickup
check on curio slot alongside the mayPlace
.