Download TabAPI — Minecraft Mods — MetaMods
TabAPI

TabAPI

Active

Downloads

0

Last update

1 month ago

Versions

1.20 — 1.20.6
Client
Fabric
Libraries
Control
Utils

TabAPI

Developer library for adding tabs to inventory interfaces.

This API was initially developed for Minecraft version 1.20.1, but supports multiple game versions.

Functionality

The project was created as a foundation for the SkillZ modification and is based on the LibZ library code from Globox_Z. We preserved only the inventory interface functionality and added side panel creation capabilities.

Tab Configuration

For tabs with set identifiers, management is available through the configuration file config/tabapi_tabs.json. In this file, you can enable (true) or disable (false) individual tabs.

Developer Guide

To create custom tabs:

  • Create a tab class by inheriting from the base InventoryTab class
  • Define the following parameters:
    • @Nullable Identifier id - unique tab identifier (specified only for permanent tabs with disable capability)
    • MutableText tooltip - tooltip text when hovering
    • @Nullable Identifier icon - tab icon (if null, you can specify an item using the getItemStack method or configure custom rendering)
    • int preferedPos - preferred tab position in the list
    • boolean customRendering - custom rendering flag (when enabled, overriding the customRender method is required)
    • Class... screenClasses - screen classes that the tab can work with (in most cases, one class is sufficient)

After creating the tab class, register it in the system using the TabAPI.registerInventoryTab or TabAPI.registerSideInventoryTab method in your mod's initialization method.

Project members
Sygikal

Sygikal

Developer

Created: 5 Mar 2025

ID: 83631