GBLib

GBLib

A patchouli alternative for fabric 1.20.2

30 downloads

📘 GBLib — Guidebook Library for Fabric Mods

GBLib is a lightweight, data‑driven guidebook framework for Fabric mods on Minecraft 1.20.2.
It provides a clean API for creating in‑game documentation, tutorials, manuals, codices, and mod guides — all without writing a single line of GUI code.

Whether you’re building a small utility mod or a full content expansion, GBLib gives you a polished, customizable book system that fits seamlessly into Minecraft’s UI style.


✨ Features

📚 Data‑Driven Guidebooks

Define entire books using simple JSON files:

  • Titles, authors, and metadata
  • Pages with wrapped text
  • Categories and documentation entries
  • Fully reloadable via resource packs

No Java boilerplate required.

🖼️ Customizable GUI

GBLib includes a flexible guidebook screen:

  • Supports custom textures
  • 9‑slice rendering for crisp corners
  • Adjustable size (default 185×144)
  • Foreground rendering (no background bleed)
  • Clean text wrapping and layout

Drop in your own texture and the library handles the rest.

🧩 Easy Integration

Register a guidebook item with one line:

GuidebookItem.setBookId(stack, new Identifier("modid", "my_book"))`

Open a book from anywhere:

GuidebookClientAPI.open(book)`

🔄 Hot‑Reload Support

Guidebooks reload automatically when resources reload, making iteration fast and painless during development.


📁 JSON Structure Example

{
  "title": "Example Guidebook",
  "author": "GBLib",
  "pages": [
    { "type": "text", "content": "Welcome to your new guidebook!" }
  ]
}

Place guidebook files in: assets/<namespace>/gamedata/guidebooks/<id>.json


🛠️ For Mod Developers

GBLib is designed to be:

  • Lightweight — minimal overhead
  • Modular — use only what you need
  • Extendable — add custom page types, renderers, or UI elements
  • Stable — consistent behavior across reloads and sessions

Perfect for:

  • Tech mods
  • Magic mods
  • Adventure mods
  • Tutorials and onboarding
  • In‑game documentation

📦 Installation

Add GBLib as a dependency in your fabric.mod.json:

"depends": {
  "fabricloader": ">=0.14.0",
  "minecraft": "1.20.2",
  "gblib": "*"
}

Then include it like any other library mod.


❤️ Why Use GBLib?

Because writing your own guidebook system is tedious.
GBLib gives you:

  • A polished UI
  • A clean API
  • A data‑driven workflow
  • A system that “just works”

Focus on your mod’s content — let GBLib handle the documentation.


📜 License

GBLib is open‑source and free to use in any Fabric mod.
Contributions, feature requests, and PRs are welcome.


🚀 Start Building Better Guidebooks

GBLib makes it easy to create beautiful, functional in‑game documentation.
If your mod needs a guidebook, GBLib is the simplest and cleanest way to add one.

No gallery available for this project.