Posted October 2, 201411 yr So I've finally been getting around to updating my mod from 1.5 to 1.7. A lot of things are going well, but for the life of me I can't get the items in my tab to sort. I've read many times that items are added to the creative tab as they're registered in the GameRegistry, but no amount of rearranging in the code changes any order in the tab. Here's my mod file: http://pastebin.com/XFdj4B4L And here's a couple screenshots of the tab: http://gyazo.com/38a1d65dc9af1ecc897df1092bb84ccd http://gyazo.com/02a4e4413e5df75bdfb80bda07497280 As you can see, the items are all jumbled up, despite being registered in a particular order. So I decided to try to sort the tab myself, but I don't know how to do a multisort with the Comparator (specifically sorting by block first, then by name or type or whatever. Right now they're not even sorted alphabetically). Is there something I'm missing that would make this easier, or do I need to custom sort it, and how would I go about doing it?
October 2, 201411 yr In the Tutorials section is a nice tutorial by diesieben07 for sorting CreativeTabs. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
October 2, 201411 yr Author Yes, I saw that, but it doesn't say anything about sorting blocks and items in the same tab, and I tried putting the explicit thing in there and nothing changed.
October 2, 201411 yr Well in the Comparator you can sort it like you want. You can sort based on name, id, block/item. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
October 2, 201411 yr Author OK, so I see the getItemFromBlock method, but are you saying I'm supposed to keep a custom list that is fed to the tab instead of using the one from displayReleventItems? And besides, that still doesn't explain why they're not being sorted in the order they were added. EDIT: Ohhhhhhhh, I think I get it now. The list fed to the comparator is the order you want the displayReleventItems list to be sorted by, that's why it's an explicit order. I should know better than to look at tutorials when I'm tired... Still would like to know why any of this is necessary, though, instead of it being handled automatically the way it should through the registration order...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.