NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

[ Bug ] .withTabsImage needs to be patched. It doesn't actually do anything.

Open kobaltromero opened this issue 10 months ago • 1 comments

public static final DeferredHolder<CreativeModeTab, CreativeModeTab> MATTERZ = CREATIVE_MODE_TABS.register("matterz",() -> CreativeModeTab.builder()
            .withTabsBefore(CreativeModeTabs.SPAWN_EGGS)
            .withTabsImage(ResourceLocation.fromNamespaceAndPath(ID, "textures/gui/matterz.png"))

kobaltromero avatar Mar 05 '25 19:03 kobaltromero

So this is because the tabs are now sprites. Not just one mind you, but 28: 7 for top tabs in each position, 7 for bottom tabs in each position, and another 14 for their selected/unselected variant. Trying to replace that easily is a hard question since defining 28 textures in CreativeModeTab is a bit ridiculous. I could either see this as we define a 'directory' to which the default sprite locations are appended or we add a method like IClientCreativeModeTabExtensions#renderTabButton that handles it. Which makes the most sense needs further discussion

ChampionAsh5357 avatar Mar 05 '25 22:03 ChampionAsh5357