Overview#
FTB Library (often referred to as FTBLib) is the core foundational mod for the entire Feed The Beast (FTB) ecosystem on Minecraft. It serves as a centralized hub for common code, utilities, and graphical user interface (GUI) frameworks used by popular mods such as FTB Chunks, FTB Quests, FTB Teams, and FTB Ultimine.
While primarily a developer tool, FTB Library introduces several critical user-facing features, including the inventory sidebar system, a powerful in-game NBT editor, and a unified configuration system. In version 26.1.2, the mod has transitioned away from Architectury dependencies and moved its configuration format from SNBT to JSON5 for improved compatibility and performance.
Sidebar System#
The Sidebar System is the most visible feature of FTB Library. It adds a dynamic array of buttons to the top-left corner of the player's inventory screen. These buttons provide quick access to mod features without requiring complex commands.
Key Functions
- Quick Access: Open GUIs for FTB Quests, FTB Chunks (Map), or FTB Teams.
- Utility Toggles: Quickly change the time of day, toggle rain, or switch gamemodes (requires OP permissions).
- Mod Settings: Access client-side configuration menus directly from the inventory.
Customization & Edit Mode
Players can fully customize their sidebar experience:
- Enter Edit Mode: Right-click any sidebar button to enter the customization GUI.
- Hide/Show Buttons: Toggle the visibility of specific buttons to declutter the UI.
- Reordering: Drag and drop buttons to change their sequence.
- Global Toggle: The entire sidebar can be disabled via the
/ftblibrary clientconfigmenu if a player prefers a vanilla inventory look.
NBT Editor#
FTB Library includes a robust, user-friendly NBT (Named Binary Tag) Editor. This tool allows server administrators and modpack creators to view and modify the underlying data of any object in the game world without leaving the client.
| Target Type | Command Syntax | Description |
|---|---|---|
| Block | /ftblibrary nbtedit block <x> <y> <z> |
Edits the NBT data of a Tile Entity (e.g., Chest, Furnace). |
| Entity | /ftblibrary nbtedit entity <UUID> |
Edits the data of any living or non-living entity. |
| Item | /ftblibrary nbtedit item |
Edits the NBT of the item currently held in the main hand. |
| Player | /ftblibrary nbtedit player <name> |
Edits a specific player's data (e.g., health, inventory, stats). |
Editor Features
- Tree View: Navigate complex NBT structures using a collapsible folder-style interface.
- Type Safety: The editor prevents invalid data entry by enforcing tag types (Byte, Int, Long, String, etc.).
- Real-time Updates: Changes made in the GUI are applied instantly to the world upon saving.
Commands#
FTB Library provides several utility commands designed to simplify server management and testing. All commands are prefixed with /ftblibrary.
| Command | Description | Permission Level |
|---|---|---|
/ftblibrary gamemode |
Quickly cycles the player between Creative and Survival modes. | OP |
/ftblibrary rain |
Toggles weather between clear and raining. | OP |
/ftblibrary day |
Sets the world time to 1000 (Day). | OP |
/ftblibrary night |
Sets the world time to 13000 (Night). | OP |
/ftblibrary clientconfig |
Opens the client-side settings GUI for FTB mods. | User |
/ftblibrary nbtedit |
Opens the NBT Editor GUI for the specified target. | OP |
Mechanics & Configuration#
SNBT and JSON5
Historically, FTB mods used SNBT (Stringified NBT) for configuration. SNBT is a human-readable version of Minecraft's binary format. However, in version 26.1.2 for 1.20.1, FTB Library has transitioned to JSON5.
- JSON5 Benefits: Supports comments, trailing commas, and unquoted keys, making it much easier for modpack creators to edit files manually.
- Location: Configuration files are typically found in the
config/folder of the Minecraft instance, often with the.snbtor.json5extension.
UI Framework
FTB Library provides a component-based GUI system. This allows other FTB mods to have a consistent look and feel. Key elements include:
- Scrollable Lists: Used in quest logs and chunk claiming screens.
- Tooltips: Advanced tooltips that can render icons and formatted text.
- Context Menus: Right-click menus used throughout the FTB suite for settings and actions.
Technical Details#
For modpack creators and developers, FTB Library offers several extensible systems:
- Sidebar JSONs: New sidebar buttons can be added by placing JSON files in
assets/<modid>/sidebar_buttons/. This allows non-FTB mods to integrate with the sidebar system. - Icon Class: A reworked rendering system that handles textures, item icons, and even remote URLs for UI elements.
- Team Integration: While FTB Teams is a separate mod, FTB Library provides the underlying UI components for team management, color selection, and member lists.