Chapters
Documentation (datapacks, KubeJS, FTB, examples): https://github.com/GabinFqt/chapters/wiki
Chapters is a progression mod for NeoForge 1.21.1, inspired by GameStages. Name your progression steps chapters (stages) and lock items, fluids, Mekanism chemicals, and recipes until you unlock them, so players cannot use gated content early.
Built for pack authors who want one integrated progression layer on modern NeoForge: datapacks, KubeJS, JEI, Mekanism, and FTB (Library, Teams, Quests).
FTB Library, Teams, and Quests
- With FTB Library, Chapters becomes the FTB stage provider. FTB Quests can use Stage Reward (grant a chapter when claimed), Stage Task (require a chapter), and Stage Required on quests or chapters, using your chapter ids with no extra registration.
- With FTB Teams as well, unlocks live on the team and are shared by the whole party. Inventory checks and JEI updates apply to all online members. Commands, KubeJS PlayerStages, and FTB Quests stage rewards all use the same team storage. Joining a team gives that team's stages; personal progress does not carry over the same way (see the wiki for migration notes).
- For custom conditions on rewards, pair FTB Quests Custom Reward with KubeJS. Sample: examples/kubejs/server_scripts/ftbquests_chapter_reward.js in the GitHub repo.
What you can lock
- Items: single id, tag (hash + namespace + path), or everything from a mod with at-sign + modid.
- Fluids: same rules, including buckets and common transfers when a server player is involved.
- Mekanism chemicals: gases, infusions, slurries, pigments by id, tag, or mod (requires Mekanism).
- Recipes: by recipe id. Vanilla crafting table recipes are blocked on the server until unlocked.
- One mod at once: at-sign + modid can cover items, fluids, and chemicals from that mod in a single stage entry.
- Inventory enforcement: locked items are dropped automatically while the player lacks the stage (each tick online, and when stages change or reload).
JEI
With JEI installed, locked ingredients and recipes are hidden client-side and return after unlock.
Commands
Replace PLAYER and STAGE with real names.
- /chapters add PLAYER STAGE
- /chapters remove PLAYER STAGE
- /chapters list PLAYER
- /chapters check PLAYER STAGE
- /chapters reload
Datapacks
- Put each stage JSON in your datapack at data/NAMESPACE/chapters/stages/STAGE_ID.json (standard Minecraft datapack layout).
- Each file can list items, fluids, chemicals, recipes, and optional namespace keys.
- A plain id is one entry. A hash-prefixed entry selects a tag. An at-sign prefixed entry selects everything from that mod for that category.
- If several stage files mention the same thing, the player needs at least one of the stages that reference it.
KubeJS
- On server loaded, call ChaptersEvents.defineStage with a stage id and an array of strings.
- Use the recipe:, fluid:, and chemical: prefixes for non-item entries.
- PlayerStages.of(player) supports add, remove, has, and get.
- Multiple defineStage calls in the same server tick batch into one rebuild.
Quick start
The jar ships no preset stages.
1. Add a datapack stage that locks netherite ingot, then reload.
2. Run /chapters check on yourself: should be false.
3. Try /give for the item: blocked or dropped.
4. /chapters add the stage: item becomes usable.
Example scripts: examples/kubejs on [GitHub](https://github.com/GabinFqt/chapters/tree/main/examples/kubejs).
Links
- GitHub: https://github.com/GabinFqt/chapters
- Releases: https://github.com/GabinFqt/chapters/releases
- License: MIT
Issues and suggestions are welcome on GitHub.