Curios API (Fabric)

Curios API (Fabric)

819k Downloads

Equip from use ignores `ICurio#canUnequip` of curio item already in slot

MrCrayfish opened this issue ยท 0 comments

commented

Versions (Be specific, do not write "latest"):

  • Curios: 5.2.0-beta3+1.20.1
  • Forge/Fabric: Forge

Observed Behavior:

Equipping an item from use will ignore canUnequip of the curio item already in the slot,

Expected Behavior:

If an item present in the curios slot doesn't allow it to be unequipped, block attempts of another curio item equipping from the use action.

Steps to Reproduce:

  1. Create a curio item that doesn't allow it to be unequipped from the slot and can be equipped from use.
  2. Place the item into the designated curio slot
  3. Get a copy of the same curio item and and rename the item with an anvil
  4. Perform the equip form use action and the copied item will now be in the curio slot, while the "unequipable" item has been unequipped.

For context on this problem, I have a backpack mod and the backpack can only be unequipped if it's inventory is empty (for balancing purposes). This works as intended if using your cursor to take it out of the slot in the GUI but can be bypassed if using the equip from use action.