Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of empty item groups in the creative menu #3600

Merged
merged 3 commits into from
Feb 18, 2024

Conversation

Syst3ms
Copy link
Contributor

@Syst3ms Syst3ms commented Feb 17, 2024

Fixes #3566. The bug was caused by item groups being distributed into pages without checking if they could even be displayed. This PR waits until they have been initialized to do that, and relegates non-displayable groups to the end of the list, making it so that old behavior functions correctly. Testmod has been augmented with a regression test.

By coincidence, another bug was fixed wherein empty item groups could sometimes be selected when switching pages.

Empty/non-displayable item groups are now put after all other groups and only then are they split into pages.
Fixed an issue where empty item groups could get selected when switching pages
@Syst3ms Syst3ms added bug Something isn't working small change labels Feb 17, 2024
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Feb 18, 2024
@modmuss50 modmuss50 merged commit f9b333c into FabricMC:1.20.4 Feb 18, 2024
5 checks passed
modmuss50 pushed a commit that referenced this pull request Feb 18, 2024
* Better handling of empty item groups in pagination

Empty/non-displayable item groups are now put after all other groups and only then are they split into pages.

* Serendipitious bugfix

Fixed an issue where empty item groups could get selected when switching pages

* checkstyle

(cherry picked from commit f9b333c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merge me please Pull requests that are ready to merge small change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too many empty creative tabs breaks the tab selector. 1.20.4
2 participants