Not Enough Items 1.8.+

Not Enough Items 1.8.+

16M Downloads

Feature Request: Sort option, by Inventory Tweaks

IMarvinTPA opened this issue ยท 10 comments

commented

When writing a large inventory tweaks tree, it would be nice if I could do it against all of the items, such as NEI's screen. Could you add a sort option to use Inventory Tweaks's sort?

In 1.7, I could fake it with an ME system, but Refined Storage lacks this sort option.

Bonus points if there can be a visible divider between the last item in the tree and the unsorted/undefined items.

(Cross posted as an InvTweaks request too to use the NEI API: Inventory-Tweaks/inventory-tweaks#404 )

Thanks,
IMarv

commented

It's possible, at the moment I'm looking at More jei integration before I add new features, but I certainly like the idea. Meantioning @mezz because he may be interested.

commented

I'm trying to figure out how to get JEI, NEI, and Inventory Tweaks to all run in an Eclipse workspace to make the stupid small mod that would do this... My understanding of how gradle and how to get these things working is just not there. The best example I can find on how is in JEI's setup thing, and it isn't complete enough for me to successfully get just it running. (The videos it links do not use eclipse.)

IMarv

commented

You don't need NEI in your dev environment to do this. Also, setting up the NEI project is pretty tough.
For your mod, get all the items from JEI and put them into a container where you can sort them.

You can get all the known items by using JEI's API:

IIngredientRegistry.getIngredients(ItemStack.class);
commented

I figured out how to get JEI to work and updated the instructions on its setup page. Mostly it involved re-executing the gradlew commands after adding the project as a dependency.
I figured out how to get NEI added by following the instructions at http://bedrockminer.jimdo.com/modding-tutorials/advanced-modding/miner-s-basic/ for all three of the chicken mods, CCL, CCC, and NEI.
I'm still having troubles getting Inventory tweaks to run though. I think he has something that modifies access to the keybinding and the development environment isn't doing that causing the error I am seeing.
I'm trying to make a mod that connects the NEI sort options and Inventory Tweaks's item comparison functions.

(Partly just to get reacquainted with modding Minecraft and getting mods into the development environment.)

Thanks,
IMarv

commented

Sorry for the double post:
@mezz
I think you confused the base request. I want NEI to have a sort option that sorts the inventory panel using the sort order that Inventory Tweaks creates based off of the item tree file. Basically, if you have 1 of every item in an infinitely big chest and clicked the Inventory Tweaks sort button, that order.

In my impatience, I'm trying to make a really short mod that converts the API from inventory tweaks into a comparitor and stuff it into the API for NEI as a new sort option. It has taken me 3 hours to get JEI, CCL, CCC, and NEI running in Eclipse. Inventory Tweaks eludes me though.

IMarv

commented

Can you define some things so I understand? "inventory panel" and "item tree file"

commented

Inv tweaks allows you to define a custom sorting for your inventory, he wants Nei/jei to have the ability to do the same, order the item panel based off those sorting rules for easier testing.

commented

Ok thanks, I think I understood correctly then.

@IMarvinTPA
NEI does not provide the item panel any more, that is from JEI, so I don't think you need NEI at all.
JEI's item panel is not currently sortable, so I recommend creating your own scrolling inventory with those items so that you can test sorting there (something like the creative item list).

commented

@covers1624 Thank you for interpreting my 2:30 am sleepy brain. I meant to say item panel.
@mezz The sorting configuration screens are in NEI, but I just tried them out and they appear to do nothing to the actual sort... I guess both NEI and JEI need some work to get sorting re-implemented at all. I did not realize that last night.

Thanks,
IMarv

commented

Yes, I recommend creating a fake scrollable GUI that is populated from the INV tweaks filtering. You can easily render a different colour overlay on unsorted items.