Curios API (Fabric)

Curios API (Fabric)

819k Downloads

[Bug]: "curio" slots aren't validated as expected

ochotonida opened this issue · 3 comments

commented

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)

  1. Place any curio on an armor stand. Because Curious Armor Stands only uses curio slots, it doesn't actually check whether an item can be equipped, so equipping doesn't cause any issues yet.
  2. Leave the world and load it again
  3. Curios drops the items when loading the armor stand, despite them being equipped in a curio slot.
  4. Give armor stands another slot of a different type (e.g. head)
  5. Place an item tagged with this slot type on the armor stand. Curious Armor Stands will still place the item in the curio slot.
  6. This time, after reloading the world, the item stays in the curio slot, as expected. Items not tagged as head still drop from armor stand.

Loader

Forge

Loader Version

47.2.0

Mod Version

Curios 5.8.1

Relevant Log Outputs

No response

commented

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.

commented

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.

commented

Ah okay, makes sense then. I've got a tentative fix in development, just need to run some tests and should be included in the next update coming soon.