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

Crash when unequipping curio with slot-increasing attribute #221

Closed
Aizistral opened this issue Feb 13, 2022 · 0 comments
Closed

Crash when unequipping curio with slot-increasing attribute #221

Aizistral opened this issue Feb 13, 2022 · 0 comments
Assignees
Labels
type: bug Something isn't working

Comments

@Aizistral
Copy link
Contributor

Versions:

  • Curios: 1.18.1-5.0.6.0
  • Forge/Fabric: 1.18.1-39.0.64

Observed Behavior:

It would appear that equipping the curio with attribute modifier for extra slot of the same type as the curio itself, and subsequently unequipping it causes the game to spontaneously explode.

Expected Behavior:

The game does not spontaneously explode.

Steps to Reproduce:

  1. Make some accessory, say, with the help of ICurioItem interface;
  2. Add attribute modifiers to it by overriding ICurioItem#getAttributeModifiers(SlotContext, UUID, ItemStack);
  3. Use ICuriosHelper to include modifier for +1 slot of the same type as accessory itself;
  4. Start up the game;
  5. Open Curios inventory;
  6. Equip the accessory;
  7. Unequip the accessory;
  8. Watch as the game explodes.

Log: latest.log

Additional Context:

I only reproduced this in development environment, singleplayer. The slot in this case is my custom scroll slot with default size of 0, which is "unlocked" through permanent modifier adding +1 slot of the type, applied via ICurioStacksHandler#addPermanentModifier.

@Aizistral Aizistral added the type: bug Something isn't working label Feb 13, 2022
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