Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey there all, I have a very annoying problem.

Using Forge 1.20+ has broken one under-used, very specific feature.

I know for a fact that creative tabs have a 'background' texture and a 'tabs' texture. Since the start of 1.19 (and some other versions), I was using two textures for my mod that overwrite the vanilla 'tabs.png' and 'items.png' textures for my mod's tab. They worked flawlessly, until 1.20+.

The 'background' image still changes to the custom one, however, my code didn't seem flawed at all.

public static RegistryObject<CreativeModeTab> ALL_ITEMS_TAB_v2 = CMTS.register("thingamajigs",
            () -> CreativeModeTab.builder()
                    .icon(() -> new ItemStack(ThingamajigsItems.THINGAMAJIG.get()))
                    .title(Component.translatable("itemGroup.Thingamajigs"))
                    .withBackgroundLocation(new ResourceLocation("thingamajigs:textures/gui/thingamajigsitems.png"))
                    .withTabsImage(new ResourceLocation("thingamajigs:textures/gui/thingamajigstabs.png"))
                    .withTabsBefore(CreativeModeTabs.SPAWN_EGGS)
                    .build());

The specific line of code that used to work is:

.withTabsImage(new ResourceLocation("thingamajigs:textures/gui/thingamajigstabs.png"))

But this old method for the builder does not change the 'tabs' image anymore. It changes the tab's icon now according to the notes in the creative tab class.

What is the new method or way to change the 'tabs.png' image for creative mode tabs in 1.20+?

I cannot figure out how it is done, as the class for the creative tab doesn't have a single method that changes the 'tabs.png' image to a custom one, just the private variable 'tabsImage' being automatically set to the default one.

If it isn't possible anymore due to some vanilla change, then I guess I'll disable the background image.

Edited by CreativeMasterBonin

  • Guest changed the title to [1.20] Help with custom creative tab textures

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.