Stage-based progression gating for NeoForge 1.21.1
A modern take on GameStages: one mod, datapack- and KubeJS-driven.
StageLock lets modpack makers lock content behind stages. Stages are named milestones such as iron_age or nether. Players unlock them through advancements, quests, commands or scripts. Until then, locked content can't be used. It can also be hidden entirely.
/team.Drop JSON files into a datapack. /reload applies changes instantly.
{
"type": "stagelock:item",
"requires": "iron_age",
"items": ["#c:gems/diamond", "@mekanism"],
"hidden_name": "Shiny Rock"
}
Prefer scripts? The KubeJS API builds the same rules:
StageLockEvents.restrictions(event => {
event.item('minecraft:diamond').requires('iron_age').hideName('Shiny Rock')
event.recipe('minecraft:iron_pickaxe').requires('stone_age')
event.dimension('minecraft:the_nether').requires('nether')
})
Existing KubeJS player.stages scripts and FTB Quests stage tasks keep working. StageLock stores the stages behind them.
All of these are optional:
StageLock scripting helper.Every command also works as /stage.
/stagelock grant | revoke <players> <stage>: works on offline players too./stagelock global and /stagelock team: manage server-wide and team stages./stagelock why <player>: explains exactly which rules lock the held item./stagelock dump: exports every rule and stage for review./stagelock import gamestages: migrates existing GameStages player data.A small example progression ships inside the mod: Stone Age, then Iron Age, then the Nether. Enable it with:
/datapack enable "mod/stagelock:datapacks/examples"
Requires NeoForge 21.1+ on Minecraft 1.21.1. Install it on both client and server.