LeoBeliik / ConvenientCuriosContainer

Convenient Curios container is a Minecraft mod that allows easy management of trinkets that use the Curios API.

Home Page:https://www.curseforge.com/minecraft/mc-mods/convenient-curios-container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug with Enigmatic Legacy (and any other mods that restrict unequippability of their curios')

Aizistral opened this issue · 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

  1. Enter the world;
  2. 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);
  3. Open Curios Container;
  4. Use curio swap feature to try and displace supposedly unequippable curio from its slot;
  5. Witness!

Crashlog

Not applicable.

Additional context

This can be easily fixed by doing mayPickup check on curio slot alongside the mayPlace.