Large sorting file leaves unsorted items in the middle of the sort.
IMarvinTPA opened this issue ยท 4 comments
Minecraft Version: 1.10.2
Inventory Tweaks Version: 1.61-58
I have also seen this issue in 1.7.10.
Using a very large sorting file, such as https://pastebin.com/yirbXvvh
will result in unsorted items being in the middle of the pack. It seems like the default max-value is too small compared to the list. Once it gets past this value, the remaining items are sorted correctly.
I can see this easily with a modified version of JEI which enables sorting by inventory tweaks in the panel. I have provided the code to do this to JEI on github but I do not believe it has been used. My custom JEI can be retrieved from my website at http www.imarvintpa.com minecraft/jei_1.10.2-3.14.7.500.jar
You will need to go into the JEI configuration panel and move IT sorting from the end of the list to the beginning. If you update the file, you need to edit this again to refresh JEI's cache. I usually add or remove a trailing comma to the list.
With this file in the Age of Engineering modpack, the issue seems to occur between Pumpking Pie and Milk. Pack version 1.0.3, easy test, put a pumpkin pie, bucket of milk, and a Forestry Queen in a chest. If the sort is working right, the queen will be last. If it is broken, she will be in the middle. I have yet to sort Forestry items, so only those that have ore dictionary entries should appear in the sort.
Thanks,
IMarv
@Kobata
I built my own backport for this fix. So, I'm a happy camper. Some of the unsorted items were displaying within part of the end of the sorted area. I had to bump the initial value of highestOrder. I used 50, but I'm not going to spend the time working out exactly why 0 is flakey.
Edit 1: I could be wrong and it is just some lingering potions just aren't sorted. But they appear after non-minecraft unsorted items and other unsorted minecraft items. The brack-water is weird.
Edit 2: I'm not so sure any more about the flakey thing. Seems splash and lingering potions lacked a catch-all entry at the end.
Thanks,
IMarv
@Kobata
Your old solution of using a constant was better, you just picked the wrong constant.
I modified my code to use int newItemOrder = Int.MaxValue(); at about line 202. This allows for secondary sorts to see that all of the unsorted items are equal. I was getting all unsorted items basically sorting in the order they were added.
Thanks,
IMarv
See #442
Fixed in later 1.11 and the 1.12 versions, will not be backported.