Refined Storage

Refined Storage

77M Downloads

Curio bugs

eXmaS opened this issue · 2 comments

commented

Wireless crafting monitor is not working from curio slot.
Some items in the hotbar (depending in which curio slot fluid/item/crafting grid is placed) are locked when u try to move them to storage.

  • Minecraft: 1.16.5
  • Forge: 36.2.1
  • Refined Storage: 1.9.15/0.7.3
commented

Can confirm that the wireless crafting monitor is not working when in a Curio slot.
Log: https://paste.ubuntu.com/p/n8sVj2nqTH/

I was also able to reproduce the issue with a hotbar slot blocked.

commented

Optional<ImmutableTriple<String, Integer, ItemStack>> curio = CuriosApi.getCuriosHelper().findEquippedCurio(stack -> validItems.contains(stack.getItem()), Minecraft.getInstance().player);
if (curio.isPresent()) {
RS.NETWORK_HANDLER.sendToServer(new OpenNetworkItemMessage(curio.get().getMiddle(), curio.get().getLeft()));

I briefly looked at the code and it looks like that findEquippedCurio returns

[com.refinedmods.refinedstorage.screen.KeyInputListener:findAndOpen:60]: Optional[(belt,0,1 creative_wireless_grid)] or
[com.refinedmods.refinedstorage.screen.KeyInputListener:findAndOpen:60]: Optional[(body,0,1 creative_wireless_grid)]
depending on which slot the network item is placed in.

0 being the slotId that is then passed down further which locks then first slot of the hotbar.

Since @Darkere did the implementation for this and I'm not familiar with the Curios API, do you have an idea why that method always returns 0 as the slotId?

As far as I can see, it's not actually documented what the returned triplet represents.

https://github.com/TheIllusiveC4/Curios/blob/b182e7e8a56faf0c00ea62e6852f63e555955995/src/main/java/top/theillusivec4/curios/common/CuriosHelper.java#L110-L121

Judging from this, it kind of looks like that the slotId 0 is not for the whole inventory of the player but just for the "belt"/"body" part. (Although it doesn't look like there's multiple belt/body slots (at least when only used with RS. I guess other mods register them)).