Crash when unequipping curio with slot-increasing attribute
Aizistral opened this issue ยท 0 comments
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:
- Make some accessory, say, with the help of
ICurioItem
interface; - Add attribute modifiers to it by overriding
ICurioItem#getAttributeModifiers(SlotContext, UUID, ItemStack)
; - Use
ICuriosHelper
to include modifier for +1 slot of the same type as accessory itself; - Start up the game;
- Open Curios inventory;
- Equip the accessory;
- Unequip the accessory;
- 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
.