
Fractal
Library for item subgroups for the creative menu
Обновлён 20 июня 2026 г. · опубликован 19 июля 2023 г.
About Fractal
This repo is a fork of lib39/fractal by unascribed, with added support for styled groups. I will take care of this repo while unascribed is busy.
Fractal introduces item subgroups for the creative menu.
Why Fractal?
- Fractals Subgroups are very condensed, allowing you to add up to 12 subgroups for each of your tabs
- Creating a new ItemSubGroup only takes one line of code and no changes in the way you assign your items to groups. Just pass them the ItemSubGroup instead of your main item group
Limitations
- More than 12 subgroups per item group, while fully functional, will look weird.
- The tiny font used for the labels does not support full unicode
Examples
Vanilla Style Subgroups

public static final Identifier GROUP_ID = new Identifier("mymod", "main");
public static final ItemGroup MAIN = FabricItemGroup.builder()
.icon(() -> new ItemStack(Blocks.REDSTONE_BLOCK))
.entries((displayContext, entries) -> entries.add(Items.APPLE))
.displayName(Text.translatable("mymod.1"))
.noRenderedName()
.build();
public static final ItemGroup EQUIPMENT = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.equipment")).entries((displayContext, entries) -> entries.add(Items.APPLE)).build();
public static final ItemGroup FUNCTIONAL = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.functional")).styled(STYLE).entries((displayContext, entries) -> entries.add(Items.BAKED_POTATO)).build();
public static final ItemGroup CUISINE = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.cuisine")).entries((displayContext, entries) -> entries.add(Items.CACTUS)).build();
public static final ItemGroup RESOURCES = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.resources")).styled(STYLE).entries((displayContext, entries) -> entries.add(Items.DANDELION)).build();
@Override
public void onInitialize() {
Registry.register(Registries.ITEM_GROUP, GROUP_ID, MAIN);
}
Applying a custom style
You are also able to apply a style to your ItemSubGroups, by supplying custom background, tab, subtab and scrollbar textures. You can even mix and match! In this example, the first two ItemSubGroups use a custom style by supplying texture files that are being shipped with your mod. The latter two tabs use the vanilla style.

// Texture (put into \resources\assets\fractal\textures\gui\container\creative_inventory)
public static final Identifier BACKGROUND_TEXTURE = new Identifier("fractal", "textures/gui/container/creative_inventory/custom_background.png");
// Sprites (put into \resources\assets\fractal\textures\gui\sprites\container\creative_inventory)
public static final Identifier SCROLLBAR_ENABLED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_scrollbar_enabled");
public static final Identifier SCROLLBAR_DISABLED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_scrollbar_disabled");
public static final Identifier SUBTAB_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_subtab_selected");
public static final Identifier SUBTAB_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_subtab_unselected");
public static final Identifier TAB_TOP_FIRST_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_top_first_selected");
public static final Identifier TAB_TOP_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_top_selected");
public static final Identifier TAB_TOP_LAST_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_top_last_selected");
public static final Identifier TAB_TOP_FIRST_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_top_first_unselected");
public static final Identifier TAB_TOP_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_top_unselected");
public static final Identifier TAB_TOP_LAST_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_top_last_unselected");
public static final Identifier TAB_BOTTOM_FIRST_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_bottom_first_selected");
public static final Identifier TAB_BOTTOM_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_bottom_selected");
public static final Identifier TAB_BOTTOM_LAST_SELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_bottom_last_selected");
public static final Identifier TAB_BOTTOM_FIRST_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_bottom_first_unselected");
public static final Identifier TAB_BOTTOM_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_bottom_unselected");
public static final Identifier TAB_BOTTOM_LAST_UNSELECTED_TEXTURE = new Identifier("fractal", "container/creative_inventory/custom_tab_bottom_last_unselected");
public static final ItemSubGroup.Style STYLE = new ItemSubGroup.Style.Builder()
.background(BACKGROUND_TEXTURE)
.scrollbar(SCROLLBAR_ENABLED_TEXTURE, SCROLLBAR_DISABLED_TEXTURE)
.subtab(SUBTAB_SELECTED_TEXTURE, SUBTAB_UNSELECTED_TEXTURE)
.tab(TAB_TOP_FIRST_SELECTED_TEXTURE, TAB_TOP_SELECTED_TEXTURE, TAB_TOP_LAST_SELECTED_TEXTURE, TAB_TOP_FIRST_UNSELECTED_TEXTURE, TAB_TOP_UNSELECTED_TEXTURE, TAB_TOP_LAST_UNSELECTED_TEXTURE,
TAB_BOTTOM_FIRST_SELECTED_TEXTURE, TAB_BOTTOM_SELECTED_TEXTURE, TAB_BOTTOM_LAST_SELECTED_TEXTURE, TAB_BOTTOM_FIRST_UNSELECTED_TEXTURE, TAB_BOTTOM_UNSELECTED_TEXTURE, TAB_BOTTOM_LAST_UNSELECTED_TEXTURE)
.build();
public static final ItemGroup EQUIPMENT = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.equipment")).styled(STYLE).entries((displayContext, entries) -> entries.add(Items.APPLE)).build();
public static final ItemGroup FUNCTIONAL = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.functional")).styled(STYLE).entries((displayContext, entries) -> entries.add(Items.BAKED_POTATO)).build();
public static final ItemGroup CUISINE = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.cuisine")).entries((displayContext, entries) -> entries.add(Items.CACTUS)).build();
public static final ItemGroup RESOURCES = new ItemSubGroup.Builder(MAIN, Text.translatable("itemGroup.mymod.resources")).entries((displayContext, entries) -> entries.add(Items.DANDELION)).build();
Версии
| Версия | Канал | Игра | Загрузчики | Дата | Скачать |
|---|---|---|---|---|---|
| 2.1.2+26.2-neoforge | Релиз | 26.2 | neoforge | 20 июня 2026 г. | .jar (285 КБ) |
| 1.6.1+26.2 | Релиз | 26.2 | fabric | 20 июня 2026 г. | .jar (292 КБ) |
| 1.6.1+26.1 | Релиз | 26.1, 26.1.1, 26.1.2 | fabric | 26 апреля 2026 г. | .jar (292 КБ) |
| 2.1.0+26.1-neoforge | Релиз | 26.1, 26.1.1 | neoforge | 5 апреля 2026 г. | .jar (287 КБ) |
| 1.6.0+26.1 | Релиз | 26.1, 26.1.1 | fabric | 5 апреля 2026 г. | .jar (292 КБ) |
| 1.5.0+1.21.11 | Релиз | 1.21.11 | fabric | 16 марта 2026 г. | .jar (34 КБ) |
| 1.4.0+1.21.1 | Релиз | 1.21.1 | fabric | 16 марта 2026 г. | .jar (295 КБ) |
| 2.1.0+1.21.11-neoforge | Релиз | 1.21.11 | neoforge | 16 марта 2026 г. | .jar (291 КБ) |
| 1.7.0+1.21.1-neoforge | Релиз | 1.21.1 | neoforge | 16 марта 2026 г. | .jar (294 КБ) |
| 2.0.0+1.21.11-neoforge | Релиз | 1.21.11 | neoforge | 23 декабря 2025 г. | .jar (36 КБ) |
| 1.5.0+1.21.11 | Релиз | 1.21.11 | fabric | 21 декабря 2025 г. | .jar (34 КБ) |
| 1.5.0+1.21.9 | Релиз | 1.21.9, 1.21.10 | fabric | 5 ноября 2025 г. | .jar (34 КБ) |
| 1.5.0+1.21.6 | Релиз | 1.21.6, 1.21.7, 1.21.8 | fabric | 6 сентября 2025 г. | .jar (36 КБ) |
| 1.5.0+1.21.5 | Релиз | 1.21.5 | fabric | 6 сентября 2025 г. | .jar (37 КБ) |
| 1.4.0+1.21.4 | Релиз | 1.21.4 | fabric | 19 декабря 2024 г. | .jar (45 КБ) |
Показаны последние 15 из 25 версий. Все версии — на Modrinth.
Ченджлог
1.4.0+1.21.4Релиз1.21.4 · 19 декабря 2024 г.
Updated to 1.21.4
1.3.0+1.20.6Релиз1.20.6 · 6 мая 2024 г.
- Updated to 1.20.6
- Simplified custom tab style handling
- Increased rendering performance
1.2.0Релиз1.20.1 · 10 марта 2024 г.
- another row of tabs can now render on the right (mainly for addons that want add their own)
- the selected tab now pops out a bit
1.0.0Релиз1.20.2 · 28 октября 2023 г.
Updated to 1.20.2
1.0.0Релиз1.20.1 · 19 июля 2023 г.
1.20.1 port
1.0.0Релиз1.19.2 · 19 июля 2023 г.
First Release
1.0.0Релиз1.19.4 · 19 июля 2023 г.
First Release
Полная история изменений — на Modrinth.
Комментарии
Загружаем…

