[Bug]: "curio" slots aren't validated as expected
ochotonida opened this issue · 3 comments
Minecraft Version
1.20.1
What happened?
CuriosApi.isStackValid returns false for curio slots if the entity doesn't have any slots that match the slot tags of the item being checked. This is a change in behaviour from version 5.7.2. As far as I can tell this doesn't happen with NeoForge 1.20.4.
How do you trigger this bug?
One way this bug can be seen is using Curious Armor Stands. (See also: ochotonida/curious-armor-stands#8)
- Place any curio on an armor stand. Because Curious Armor Stands only uses
curioslots, it doesn't actually check whether an item can be equipped, so equipping doesn't cause any issues yet. - Leave the world and load it again
- Curios drops the items when loading the armor stand, despite them being equipped in a
curioslot. - Give armor stands another slot of a different type (e.g.
head) - Place an item tagged with this slot type on the armor stand. Curious Armor Stands will still place the item in the
curioslot. - This time, after reloading the world, the item stays in the
curioslot, as expected. Items not tagged asheadstill drop from armor stand.
Loader
Forge
Loader Version
47.2.0
Mod Version
Curios 5.8.1
Relevant Log Outputs
No response
I was mistaken, It happens with NeoForge 1.20.4 as well. My launcher installed 7.3.4 when I tested this since 7.4.0 is marked as beta.
As far as I can tell this doesn't happen with NeoForge 1.20.4.
Does this happen with Forge 1.20.4?
It's strange that it doesn't happen with NeoForge 1.20.4, as the potential code that could cause this is almost identical between 1.20.1 and 1.20.4.