Extra-Utilities-2-Source icon indicating copy to clipboard operation
Extra-Utilities-2-Source copied to clipboard

Extra Utilities "search nearby inventories" feature fails if Bibliocraft Armor Stand is in range.

Open IcedLance opened this issue 5 years ago • 5 comments

Minecraft 1.12.2 EU2 1.9.5 Bibliocraft 2.4.5

If a Bibliocraft Oak Armor Stand is within 16 blocks, pressing the "T" does nothing.

IcedLance avatar Oct 18 '18 05:10 IcedLance

Could this be related to https://github.com/Nuchaz/BiblioCraft/issues/601 ? Do you see the same error in the server console?

enricotagliavini avatar Nov 06 '18 18:11 enricotagliavini

Oh okay I see, when trying the "find item" utilities key I recieve an error message saying bibliocraft crashed. Now I know why !

d0ob avatar Aug 30 '19 15:08 d0ob

This has been bothering me for a while, so I decided to try and fix the issue. Here is what I found.

  1. It seems to work in deobfuscated dev environment. So, the problem here is obfuscation. Specifically, method getStackInSlot, which has SRG name func_70301_a.
  2. There is an interface in Forge called IItemHandler. Every class that implements this interface can store items. This interface has method getStackInSlot that EU2 relies on for this function.
  3. Here comes Bibliocraft. Its storage blocks also implement this interface. However, they also implement IInventory from Minecraft, which also has getStackInSlot method. And because of that, they got obfuscated. So for example, instead of getStackInSlot it has func_70301_a.
  4. So EU2 tries to getStackInSlot for BiblioCraft chest, but Bibliocraft doesn't have that method implemented. It only got func_70301_a. So now (thanks to obfuscation) it's an abstract method. And when EU2 tries to get the item, it fails.

So, how to fix this? Without access to Bibliocraft source code, you can't. Or I mean you can, but it's too time consuming. But you can wrap call to getStackInSlot into try-catch and ignore the slot if getStackInSlot is not implemented.

If you are feeling adventureous and don't want to wait for a fix, you can edit EU2 bytecode and add it in.

PS. Here is the same issue Bibliocraft has.

Meegooo avatar Jun 22 '20 11:06 Meegooo

AHA!!! i was tying to figure out why "search nearby inventories" stopped working in my base, and turns out Bibliocraft book cases were the culprit, after reading this thread I tried removing the book cases and the search function worked instantly, THANKS!

ShaggyMummy avatar Jan 03 '21 10:01 ShaggyMummy

Cooking for Blockheads breaks the find item feature too.

Kiefy avatar Oct 14 '21 16:10 Kiefy