Enigmatic Legacy

Enigmatic Legacy

10M Downloads

Curio items invalidated then ejected into player inventory

D-Bigboy-302 opened this issue ยท 2 comments

commented

Forge: 1.16.5-36.0.44
Patchouli: 1.16.4-50
Curios: 1.16.5-4.0.5.0
Enigmatic Legacy: 2.11.1

Issue: Curio items are ejected from slots and placed in inventory upon reload of a world.

How to reproduce: Have Curios version 4.0.5.0, load a world, put item in Curio slot. Reload world.

This is a new feature from Curios. According to the author, this happens when a Curio is invalidated or has modified tags in your inventory. This normally isn't much of a problem unless your inventory is full, to which the item will dissappear.

commented

I made a typo. Stating it was Curios version 4.0.4.0 when it was 4.0.5.0

commented

Found the issue.

Curios' isValid checks to see if you can equip the curio you already have equipped.
https://github.com/TheIllusiveC4/Curios/blob/b4a20f72e0124ec7c1a2329374183b797e90e18f/src/main/java/top/theillusivec4/curios/common/CuriosHelper.java#L173

However, in Enigmatic Legacy all Curios assume you can't equip it if you already have it equipped.

Basically, Curios' intention for canEquip is whether or not you can equip this item assuming you have a free slot. However, the implementation in Enigmatic Legacy's side assumes canEquip means whether or not you can equip this item at the moment.

This should be a relatively straightforward fix.