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

Creative Mode Inventory Screen counts empty tabs when determining page count #1566

Open
Commoble opened this issue Sep 28, 2024 · 0 comments
Labels
triage Needs triaging and confirmation

Comments

@Commoble
Copy link
Contributor

Commoble commented Sep 28, 2024

Minecraft Version: 1.21.1

NeoForge Version: 21.1.62

Logs: no logs

Steps to Reproduce:

  1. Register a single creative tab with no contents
  2. Open the creative menu
  3. Observe that the creative menu adds a second page with no extra tabs

Description of issue:

Neoforge expands the creative inventory screen to support more than one page of tabs, to support indefinitely many mods adding their own creative tabs. This is fine.

However, there is a discrepancy in how tabs are rendered:

  1. When determining how many pages should exist, the number of tabs are counted (via CreativeModeTabRegistry.getSortedCreativeModeTabs(), regardless of their contents or visibility
  2. When determining whether to render a given tab's... tab? The little clickable nubbins that switch to that tab, only tabs filtered by CreativeModeTab::shouldDisplay are rendered

This means that empty tabs (which can be empty for legitimate reasons, such as all of a mods' content being disabled by configs, or a mod creating a tab for datapacks and addons to add content to without adding anything itself) can inflate the page count and result in empty pages-of-tabs existing

Ordinary creative tab:

image

Empty creative tab: observe, page 2 still exists but is empty!

image

If there are a lot of empty tabs this can get increasingly absurd

image

@Commoble Commoble added the triage Needs triaging and confirmation label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triaging and confirmation
Projects
None yet
Development

No branches or pull requests

1 participant