Skip to content

How to Create a Creative Mode Tab

When making a new creative mode tab you can use a combination of the 'RegisterCreativeModeTab' function and the 'CreativeModeTabBuilder' class to achieve this goal with ease

Example

1
2
3
4
5
6
7
public static Object TEST_GROUP = Registry.RegisterCreativeModeTab("test_tab", "my_modid",
            CreativeModeTabBuilder.create()
                    .setDisplayText("test_tab")
                    .setIcon(TestItems.TEST_ITEM.getRawData())
                    .setEntries(TestItems.getAll(), TestBlocks.getAll())
                    .build()
    );

RegisterCreativeModeTab(String name, String Modid, < T extends ItemGroup > aNew)

1.0.0 1.20.1 yarn Setup Required

Register's a new Creative mode tab

Parameters:

  • name: The Item name (ID).
  • Modid: The Mod ID of the registrar.
  • aNew: The instance to the tab.

Returns: The registered data.