Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MrCrayfish opened this issue Aug 8, 2023 · 0 comments
Closed
Assignees
Labels
type: bug Something isn't working

Comments

@MrCrayfish
Copy link

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.

@MrCrayfish MrCrayfish added the type: bug Something isn't working label Aug 8, 2023
@MrCrayfish MrCrayfish changed the title Equip from use ignores ICurio#canEquip Equip from use ignores ICurio#onUnequip of curio item already in slot Aug 8, 2023
@MrCrayfish MrCrayfish changed the title Equip from use ignores ICurio#onUnequip of curio item already in slot Equip from use ignores ICurio#canUnequip of curio item already in slot Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants