FlexiBook

Quick rating

FlexiBook

No reviews yet

simplely create a custom book with a web editor. supported inject image, auto layout, custom background, register book by resourcespack, i18n, inject click link

QoL & Tweaks
Mod Loaders
NeoForge
Fabric
Minecraft
26.2

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
flexibook-1.0.1+26.2.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

FlexiBook

Adaptive layout books for 1.20.1-26.2 neoforge&fabric

more versions coming soon

Custom DataComponent + client layout engine + AdaptiveBookScreen, keeping a book-like interaction while supporting:

You can use web book editor without coding. It is in sourcecode repo on Github

(the description on curseforge almost copied from Github README.md)

  • HTML-subset markup ([h1] / [p] / [b] / [color] / [img] / [link] …)
  • Resolve translation keys and reflow pagination when the book opens (current client language)
  • Auto scale-down for long content; optional two-column layout
  • Safe links: registered command ids only, or confirmed http(s) URLs
  • In-book search highlight
  • Built-in default font flexibook:default (unihex Unifont; omitting font does not fall back to minecraft:default)
  • AdaptiveBookBuilder / FlexiBookAPI for other mods
  • Data-driven themes (assets/<ns>/flexibook/themes/<id>.json)
Doc Description
docs/API.md Full API for other mods (fonts §12, data books §14) — English
docs/API.zh-CN.md Full API — 中文
editor/README.md Companion real-time editor (Electron; same unihex ZIP as the game)
docs/EDITOR_PACK_GUIDE.md Pack export/import & /flexibook give (detailed)
docs/README.md Design / plans / todo index
README.zh-CN.md 中文说明

Requirements

  • JDK 21 for Gradle (JDK 25/26 breaks on Gradle/Groovy bytecode)
  • Minecraft 1.21.1
  • NeoForge 21.1.x (see neo_version in gradle.properties)

Build

# If default java is not 21:
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
# Or set org.gradle.java.home=... in gradle.properties

./gradlew build
# jar: build/libs/flexibook-1.0.0.jar

./gradlew runClient

In-game

Creative tab FlexiBook:

  • Blank flexi_book
  • FlexiBook Field Guide sample (EN/ZH lang; adaptive layout, i18n, rich text, images, links, search)

Right-click to open; arrow keys or buttons to turn pages; search at the bottom.

Data-driven books from a resource pack (after enabling the pack, F3+T):

/flexibook list
/flexibook give <namespace:bookId>
# e.g. /flexibook give note:note11

Requires permission level ≥ 2. Creative only lists blank + built-in demo; custom packs use the command.

Integrating other mods

Full reference (dependencies, Builder, markup, link safety, components, i18n, theme JSON, FAQ): docs/API.md.

ItemStack book = FlexiBookAPI.builder("my_guide")
    .titleKey("mymod.book.title")
    // .defaultFont(...) optional → runtime resolvedFont() = flexibook:default
    .h1("mymod.book.ch1")
    .p("mymod.book.p1")
    .font("mymod.book.quote", ResourceLocation.withDefaultNamespace("uniform")) // per-paragraph override
    .bullet("mymod.book.b1")
    .image(ResourceLocation.fromNamespaceAndPath("mymod", "textures/gui/icon.png"), 48, 48)
    .link("mymod.book.click", FlexiBookAPI.commandAction("mymod:open_map"))
    .divider()
    .fromMarkup("[p]mymod.book.extra[/p]") // whole-book raw only if elements are empty
    .buildItem();

// Safe actions only (do not register arbitrary shell)
FlexiBookAPI.registerCommandAction("mymod:open_map", ctx -> ctx.message("mymod.map.opened"));

Raw markup only (no explicit font still uses the built-in default):

AdaptiveBookContent content = AdaptiveBookContent.ofMarkup(
    new TranslatableText("mymod.book.title"),
    """
    [h1]mymod.book.ch1[/h1]
    [p]mymod.book.p1[/p]
    [bullet]mymod.book.b1[/bullet]
    """
);
// content.resolvedFont() → flexibook:default
ItemStack stack = FlexiBookAPI.createBook(content);

DataComponent id: flexibook:adaptive_book_content.

Themes register from resource pack JSON: assets/<namespace>/flexibook/themes/<path>.json → id namespace:path.
Font priority: span/heading font → book-level fontflexibook:default (see docs/API.md §12).

Six-part pack layout

assets/<ns>/
  lang/*.json
  font/*
  textures/gui/book.png
  textures/item/flexi_book.png   # optional: overrides flexibook item icon when under assets/flexibook/...
  flexibook/
    books/<id>.json              # index: content + theme + optional font
    contents/<id>.json           # body
    themes/<id>.json
ItemStack stack = FlexiBookAPI.createBookFromDefinition(
    ResourceLocation.fromNamespaceAndPath("myguide", "guide"));

Markup cheat sheet

Tag Role
[h1] [h2] Headings
[p] Paragraph (inline styles nest)
[b] [i] [u] Bold / italic / underline
[color=#RRGGBB] Color
[font font="ns:id"] / [font=ns:id] Inline font (overrides book font)
[br] Line break
[divider] Divider
[img src="..." width="48" height="48" /] Image (resource path)
[link cmd="modid:action"] / [link url="https://..."] Safe link
[bullet] List item
[div class="..."] Box container

Escape: \[ \].

v1 scope

Done: DataComponent, dual storage (elements or rawMarkup), TagParser, adaptive layout + cache, single-page Screen, Builder, bilingual sample book, search, data-driven themes (default + contain + JSON reload), built-in flexibook:default unihex (same ZIP as editor), standalone editor with Unihex preview, pack export/import, /flexibook give|list.

Not in v1 / simplified:

  • Full lectern support (FlexiBookAPI.LecternCompat stub only)
  • No hijacking vanilla written_book
  • In-book WYSIWYG edit, tables, auto TOC, 3D page-turn animation

License

GNU GPL v3 © PhantomDaze

Screenshots

Gallery

  • in game
    in game
  • editor-en
    editor-en

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works