feat: initial work on creative mode tab sorting#18
Merged
Jamalam360 merged 2 commits intomainfrom Jan 19, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds creative mode tab sorting functionality to the mod, allowing items to be sorted by their associated creative mode tabs.
Changes:
- New
CreativeModeTabLookupclass that maps items to their creative mode tabs - CREATIVE_TAB comparator added to sorting options
- Command chain extended to support up to 5 sorting comparators
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| CreativeModeTabLookup.java | New singleton class that builds and maintains a lookup table mapping items to their creative mode tabs |
| Comparators.java | Adds CREATIVE_TAB comparator that sorts items by creative tab display name, with fallback for items without tabs |
| UserPreferences.java | Adds CREATIVE_TAB enum value to SortingComparator and integrates it into the comparator creation logic |
| SortItOutCommands.java | Extends command chain to support 5 comparators (previously 4) to accommodate the new CREATIVE_TAB option |
| SortItOut.java | Registers lifecycle event to build the creative mode tab lookup when server starts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
common/src/main/java/io/github/jamalam360/sort_it_out/util/CreativeModeTabLookup.java
Outdated
Show resolved
Hide resolved
common/src/main/java/io/github/jamalam360/sort_it_out/util/CreativeModeTabLookup.java
Show resolved
Hide resolved
common/src/main/java/io/github/jamalam360/sort_it_out/util/Comparators.java
Outdated
Show resolved
Hide resolved
Closed
|
From reading the original issue, I think the intended suggestion was to order to items according to their order within the tabs, not just based on the tab. I think that makes the most sense since it's a naturally stable order, and was what I was expecting when using it. |
Member
Author
|
Yes, I haven't added it in the first iteration because I wanted to think more about the implementation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.