The Best Resource for Minecraft
The Best Resource for Minecraft

FTB Library Mod Wiki

The essential foundation for the Feed The Beast mod suite, providing advanced UI systems, NBT editing tools, and a customizable inventory sidebar for Minecraft.

6 sections · 707 words

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.

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 .snbt or .json5 extension.

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.