Refined Storage

Refined Storage

77M Downloads

Dynamic JEI synchronization

Towdium opened this issue ยท 3 comments

commented

Since I wrote a little mod to tweak the filtering behavior of JEI (you can find it here), I find the item filtering behavior is not synchronized with JEI any more. I think it would be better if RS can do JEI synchronized search using interface provided by JEI to improve the compatibility.

As far as I know, you can use new ItemFilter(registry.getItemRegistry()).getItemList() to get the filtered item list, in which registry is the IModRegistry passed to your IModPlugin in method register. It seems work fine, but it's not widely tested. Otherwise maybe you can reflect the itemFilter in ItemListOverlay to do this for better performance.

commented

RS uses the JEI API IItemListOverlay#setFilterText method. Shouldn't your mod work on that?

commented

I mean it's not the text that is not synchornized, but the stacks displayed. When my mod is installed, JEI could display different stacks for the same string compared to the original behavior. But when I am in JEI synchornized mode, the searching string is synchornized but the stacks displayed is not filtered the same as JEI do. If you want to know more, that mod only has effect when language is set to Chinese.

Got some pictures for demonstration. Firstly, I put some crafting table to the system:
2016-10-20_19 51 54

And edit the string. Crafting cable is still in JEI' list, but not displayed in the grid.
2016-10-20_19 52 02

commented

You confused me, because RS doesn't use JEI logic for display stacks. It just modifies the search bar text. In that case, this is a duplicate of #482