OtherStages
OtherStages 是一款适用于 Minecraft Forge 1.20.1 的可配置基于阶段的进度系统。
它允许你将内容锁定在自定义阶段之后,并通过可配置的进度规则来解锁这些阶段。相同的阶段元数据还用于驱动游戏内的解锁覆盖层、物品工具提示以及几种警告系统。
模组支持的功能
- 阻止特定物品、物品命名空间、物品标签以及与 NBT 敏感的物品变体。
- 将物品限制应用于使用、放置、攻击、挖掘、玩家合成结果、锻造/铁砧操作、切石机、熔炉类手动配方插入、战利品掉落以及可直接使用的装备槽位。
- 阻止生物、结构、维度及村民交易等级。
- 使用每个阶段的
display_name(显示名称)、description(描述)、icon(图标)和 color(颜色)显示阶段解锁覆盖层。
- 在被阻止的物品上显示工具提示警告。
- 发出警告并可选地将玩家传送出受限维度。
- 实时检测被阻止的结构,并阻止在其内部进行交互、破坏、放置和攻击。
- 当安装了 JEI 或 REI 时,隐藏被阻止的物品。
- 通过成就、物品数量、经验值、维度、击杀数、制作次数、FTB Quests 以及嵌套的
AND / OR 逻辑来解锁阶段。
- 使用带有
otherstages:stage_analyzer 物品的存储块生成 JSON 代码片段。
重要行为
- 阶段文件夹名称即为内部阶段 ID。它可以是任意名称,例如
machine_age、arcane_tier 或 chapter_03。
- 每个阶段都必须包含
stage_info.json。其他 JSON 文件为可选。
- 阶段的
order(顺序)很重要。如果玩家拥有一个具有更高 order 的阶段,则该玩家也满足较低顺序阶段的限制条件。
- 如果你希望获得清晰的线性进度,请保持
order 值的唯一性和递增性。
- 示例阶段文件夹会在首次启动时自动创建。它们仅作为示例;你可以重命名或删除它们。
文件夹布局
在首次启动时,模组会在以下位置创建配置文件:
config/
otherstages-server.toml
otherstages/
stages/
<stage_name>/
stage_info.json
blocked_items.json
blocked_mobs.json
blocked_structures.json
blocked_dimensions.json
blocked_villager_trades.json
progression.json
generated/
config/otherstages/generated/ 目录由阶段分析器(Stage Analyzer)物品使用。
stage_info.json
此文件定义阶段身份以及向玩家显示的元数据。
支持的字段
| 字段 |
必填 |
类型 |
备注 |
display_name |
否 |
string |
在命令、消息和解锁覆盖层中显示。若未提供,则回退到文件夹名称的格式化版本。 |
description |
否 |
string |
可选的副标题/描述,用于解锁覆盖层和阶段信息输出。 |
color |
否 |
string |
采用 #RRGGBB 格式的十六进制颜色。用于对解锁覆盖层进行着色。 |
icon |
否 |
string |
物品 ID,例如 minecraft:diamond_pickaxe。用于解锁覆盖层。 |
order |
否 |
integer |
控制进度层级。较高的 order 表示较高的阶段。 |
翻译感知字符串
如果 display_name 或 description 以 otherstages. 开头,则将其视为翻译键。否则,将作为纯文本显示。
示例
{
"display_name": "Machine Age",
"description": "Basic automation is now available.",
"color": "#4FC3F7",
"icon": "minecraft:observer",
"order": 3
}
可选的每阶段文件
blocked_items.json
用于阻止直接物品 ID、物品命名空间、NBT 变体、标签、基于菜单的访问规则以及与同一阶段绑定的由交互驱动的方块目标。
支持的键:
blocked_items
blocked_namespaces
blocked_tags
tagList 作为 blocked_tags 的旧版别名
blocked_recipes
blocked_menu_classes
blocked_menu_packages
blocked_menu_types
blocked_block_ids
blocked_block_classes
blocked_block_entity_classes
blocked_block_entity_packages
每个 blocked_items 条目支持:
item
- 可选的
nbt
- 可选的
exact_match
示例:
{
"blocked_items": [
{ "item": "minecraft:diamond_pickaxe" },
{
"item": "minecraft:potion",
"nbt": { "Potion": "minecraft:strong_healing" },
"exact_match": false
}
],
"blocked_namespaces": [
"create"
],
"blocked_tags": [
"forge:tools/netherite"
],
"blocked_recipes": [
"minecraft:iron_pickaxe",
"minecraft:netherite_upgrade_smithing"
],
"blocked_menu_packages": [
"appeng",
"com.refinedmods.refinedstorage"
],
"blocked_menu_types": [
"minecraft:anvil",
"minecraft:smithing"
],
"blocked_block_ids": [
"create:mechanical_crafter"
],
"blocked_block_entity_packages": [
"com.simibubi.create.content.kinetics.crafter"
]
}
命名空间匹配是精确匹配的。create 会阻止 create:*,但不会阻止 createaddition:*。
blocked_recipes 匹配配方 ID,并且目前针对玩家合成台、工作台、锻造菜单、切石机以及向熔炉类菜单手动插入原料进行强制执行。
blocked_menu_classes 匹配确切的菜单类名。blocked_menu_packages 匹配任何全名以配置前缀开头的菜单类。blocked_menu_types 匹配已注册的 MenuType ID(如果存在)。
blocked_block_ids 匹配实际放置的方块 ID,例如 create:mechanical_crafter。blocked_block_classes 匹配运行时方块类。blocked_block_entity_classes 和 blocked_block_entity_packages 用于那些暴露了方块实体但未提供正常菜单的由交互驱动的机器。
被阻止的物品规则在游戏内的实际效果:
- 直接使用物品时拦截。
- 放置被拦截的方块,以及使用被拦截的工具或武器。
- 清除玩家合成界面和合成台中被拦截的合成结果。
- 在玩家合成界面、合成台、锻造菜单、切石机中,以及在类熔炉菜单中手动添加原料时,拦截配置好的配方 ID。
- 在非玩家菜单槽位(包括许多模组提供的表格和终端)中手动插入被拦截的物品。
- 当没有所需阶段权限的玩家打开配置的受限菜单时,自动关闭这些菜单。
- 拒绝与配置为交互驱动的方块(如
create:mechanical_crafter)进行交互,即使它们不打开普通菜单。
- 拒绝执行使用被拦截输入物的锻造或铁砧操作。
- 在被拦截的输出物能够直接移动到玩家可用槽位之前,从类似结果的菜单槽位中取走被拦截的输出物。
- 将热键栏、副手、护甲槽和支持的 Curios 饰品槽中的被拦截物品移除,将其移至主背包;如果主背包已满,则将其掉落。
- 防止被拦截物品在主背包中保留时执行正常的玩家物品库存刷新逻辑。
- 过滤掉为该玩家生成的战利品中的被拦截物品。
OtherStages 基于玩家个体生效。其他模组的自动化系统仍然可以制造被拦截的物品,但被限制的玩家无法将它们保留在可直接使用的槽位中,无法手动使用它们,也无法手动将被拦截的配方原料投入许多由菜单驱动的机器界面中。
blocked_mobs.json
阻止所列实体的自然生成及附近生成尝试。
{
"blocked_mobs": [
"minecraft:enderman",
"minecraft:warden"
]
}
blocked_structures.json
禁止进入并交互所列结构内部。
{
"blocked_structures": [
"minecraft:stronghold",
"minecraft:ancient_city"
]
}
Minecraft 1.20.1 对多种村庄变体使用独立的 ID,因此请包含所有你想要屏蔽的变体。
blocked_dimensions.json
禁止前往所列维度。
{
"blocked_dimensions": [
"minecraft:the_nether",
"minecraft:the_end"
]
}
如果在 otherstages-server.toml 中启用了 teleportOnInvalidDimension,则在登录时将位于受限维度内的玩家传送回安全位置。
如果玩家的重生点设置在受限维度内,重生目标将被重置为主世界(Overworld)。
blocked_villager_trades.json
按职业和等级屏蔽村民交易。
每个条目支持的字段:
profession(职业)
level(等级)
min_level(最低等级)
max_level(最高等级)
profession 支持以下值:
- 职业 ID,例如
minecraft:librarian
*
any
- 空值 / null
示例:
{
"blocked_villager_trades": [
{
"profession": "*",
"min_level": 2,
"max_level": 5
},
{
"profession": "minecraft:cleric",
"level": 1
}
]
}
如果村民同时拥有允许和屏蔽的交易,交易界面将仅显示可访问的选项。如果没有可访问的选项,玩家将收到警告提示。
progression.json
定义玩家如何解锁阶段。
支持的条件类型:
advancement(进度)
item_count(物品数量)
experience(经验值)
dimension(维度)
kill_count(击杀数)
craft_count(合成次数)
ftb_quest(FTB Quest 任务)
and(且)
or(或)
示例:
{
"unlock_conditions": {
"type": "AND",
"conditions": [
{ "type": "advancement", "advancement": "minecraft:story/enter_the_nether" },
{ "type": "item_count", "item": "minecraft:blaze_rod", "count": 8, "consume": true },
{ "type": "dimension", "dimension": "minecraft:the_nether" }
]
},
"next_stage": "end_access"
}
next_stage 是可选的。它可以作为你自身阶段链的文档说明,但实际的解锁逻辑由 unlock_conditions 驱动。
进度检查运行机制
模组会在发生有用事件时自动重新评估进度,包括但不限于:
- 玩家登录
- 带冷却时间的玩家 Tick
- 进度完成
- 交互行为
- 击杀行为
- 合成行为
- 拾取物品
- 维度变更
你也可以通过以下命令强制进行检查:
/otherstages check <player>
命令
所有命令均以 /otherstages 开头,需要权限等级 2。
阶段检查
/otherstages stage list
/otherstages stage <stage_name> info
/otherstages player <target> info
阶段管理
/otherstages player <target> add <stage>
/otherstages player <target> remove <stage>
/otherstages player <target> clear
/otherstages player <target> reset
reset 现在使用 config/otherstages-server.toml 中的 defaultStartingStage 值。
进度与重载
/otherstages check <player>
/otherstages reload
/otherstages cache clear
/otherstages cache info
cache info 会打印当前的物品缓存条目、跟踪的玩家、命中次数、未命中次数、无效化次数以及命中率。
调试辅助工具
/otherstages debug item
/otherstages debug menu
/otherstages debug block
/otherstages debug stages
/otherstages dimension check <player> <dimension>
/otherstages dimension list <player>
debug menu 会在存在当前打开菜单时打印该菜单信息,或者在你关闭后打印最后记住的非玩家菜单信息。它会显示类名、包名、注册的菜单类型、当前玩家是否被屏蔽、所需阶段(如适用),并提供可直接复制的 blocked_menu_* 片段。它还会建议最适合当前屏幕的按键。
debug block 会检查你注视的方块。这对于 Create 等以方块驱动交互而非菜单驱动的系统非常有用。它会打印可直接复制的 blocked_block_* 片段,并建议使用最稳定的键值。如果该方块看起来不是基于菜单的,那么 blocked_menu_* 可能不是正确的控制手段。
客户端行为
解锁覆盖层
当授予阶段时,客户端会收到阶段解锁通知,其使用以下数据:
display_name(显示名称)
description(描述)
icon(图标)
color(颜色)
这是当前通用的覆盖层格式。它不依赖于诸如 stone_age、iron_age 或 diamond_age 的阶段名称。
工具提示
被阻止的物品会添加一行工具提示,告知玩家所需的阶段。
JEI / REI
如果安装了 JEI 或 REI,则根据每位玩家已解锁的阶段来隐藏被阻止的物品。
维度与结构警告
- 受限维度使用警告覆盖层及可选的安全传送功能。
- 受限结构使用警告覆盖层并强制禁止交互。
服务器配置
主服务器配置文件:
config/otherstages-server.toml
重要选项:
enableStageMode
enableTooltips
enableWarnings
warningDuration
teleportOnInvalidDimension
defaultStartingStage
enableDebugLogging
cacheSize
defaultStartingStage 目前由 /otherstages player <target> reset 命令使用。在当前代码路径中,它不会在新玩家首次登录时自动授予。
阶段分析器
模组包含 otherstages:stage_analyzer 物品。
用法:
- 获取该物品。
- 潜行 + 右键点击存储方块。
- 模组将扫描内容并将 JSON 行写入
config/otherstages/generated/。
- 将生成的行复制到你的
blocked_items.json 中。
分析器通过直接支持或反射回退机制,支持原版容器和许多模组化的存储系统。
如果被点击的方块不是受支持的容器,分析器将回退到带有方块 ID 和状态属性的方块检查读数。
注意事项与当前范围
- 本自述文件记录了在当前代码路径中处于活跃状态的基于加载器的阶段文件。
- 内部脚手架已为某些未来的限制类型做好准备,但本自述文件仅记录目前在游戏玩法中强制执行的功能。
- 每个阶段都必须包含
stage_info.json。
- 文件夹名称即为内部阶段 ID。
- 较高的
order 值表示更高的进阶层级。
- 如果某个阶段应表现为较后的层级,请为其赋予更大的
order 值。
- 编辑 JSON 文件后请使用
/otherstages reload 重新加载。
OtherStages
OtherStages is a configurable stage-based progression system for Minecraft Forge 1.20.1.
It lets you lock content behind custom stages and unlock those stages through configurable progression rules. The same stage metadata also drives the in-game unlock overlay, item tooltips, and several warning systems.
What the mod supports
- Block specific items, item namespaces, item tags, and NBT-sensitive item variants.
- Apply item restrictions to use, placement, attacks, mining, player crafting results, smithing/anvil operations, stonecutting, furnace-like manual recipe insertion, loot rolls, and directly usable equipment slots.
- Block mobs, structures, dimensions, and villager trade levels.
- Show a stage unlock overlay using each stage's
display_name, description, icon, and color.
- Show tooltip warnings on blocked items.
- Warn and optionally teleport players away from restricted dimensions.
- Detect blocked structures in real time and stop interaction, breaking, placing, and attacking inside them.
- Hide blocked items in JEI or REI when those mods are installed.
- Unlock stages through advancements, item counts, experience, dimensions, kill counts, craft counts, FTB Quests, and nested
AND / OR logic.
- Generate JSON snippets from storage blocks with the
otherstages:stage_analyzer item.
Important behavior
- A stage folder name is the internal stage ID. It can be anything, such as
machine_age, arcane_tier, or chapter_03.
stage_info.json is required for every stage. The other JSON files are optional.
- Stage
order matters. If a player has a stage with a higher order, that player also satisfies restrictions from lower-order stages.
- Keep
order values unique and increasing if you want a clean linear progression.
- Example stage folders are created automatically on first launch. They are only examples; you can rename or delete them.
Folder layout
On first launch the mod creates config files in:
config/
otherstages-server.toml
otherstages/
stages/
<stage_name>/
stage_info.json
blocked_items.json
blocked_mobs.json
blocked_structures.json
blocked_dimensions.json
blocked_villager_trades.json
progression.json
generated/
config/otherstages/generated/ is used by the Stage Analyzer item.
stage_info.json
This file defines the stage identity and the metadata shown to the player.
Supported fields
| Field |
Required |
Type |
Notes |
display_name |
No |
string |
Shown in commands, messages, and unlock overlay. Falls back to a formatted version of the folder name. |
description |
No |
string |
Optional subtitle/description used by the unlock overlay and stage info output. |
color |
No |
string |
Hex color in #RRGGBB format. Used to tint the unlock overlay. |
icon |
No |
string |
Item ID such as minecraft:diamond_pickaxe. Used in the unlock overlay. |
order |
No |
integer |
Controls progression hierarchy. Higher order means higher stage. |
Translation-aware strings
If display_name or description starts with otherstages., it is treated as a translation key. Otherwise it is shown as plain text.
Example
{
"display_name": "Machine Age",
"description": "Basic automation is now available.",
"color": "#4FC3F7",
"icon": "minecraft:observer",
"order": 3
}
Optional per-stage files
blocked_items.json
Used to block direct item IDs, item namespaces, NBT variants, tags, menu-based access rules, and interaction-driven block targets tied to the same stage.
Supported keys:
blocked_items
blocked_namespaces
blocked_tags
tagList as a legacy alias for blocked_tags
blocked_recipes
blocked_menu_classes
blocked_menu_packages
blocked_menu_types
blocked_block_ids
blocked_block_classes
blocked_block_entity_classes
blocked_block_entity_packages
Each blocked_items entry supports:
item
- optional
nbt
- optional
exact_match
Example:
{
"blocked_items": [
{ "item": "minecraft:diamond_pickaxe" },
{
"item": "minecraft:potion",
"nbt": { "Potion": "minecraft:strong_healing" },
"exact_match": false
}
],
"blocked_namespaces": [
"create"
],
"blocked_tags": [
"forge:tools/netherite"
],
"blocked_recipes": [
"minecraft:iron_pickaxe",
"minecraft:netherite_upgrade_smithing"
],
"blocked_menu_packages": [
"appeng",
"com.refinedmods.refinedstorage"
],
"blocked_menu_types": [
"minecraft:anvil",
"minecraft:smithing"
],
"blocked_block_ids": [
"create:mechanical_crafter"
],
"blocked_block_entity_packages": [
"com.simibubi.create.content.kinetics.crafter"
]
}
Namespace matches are exact. create blocks create:*, but it does not block createaddition:*.
blocked_recipes matches recipe ids and is currently enforced for the player crafting grid, crafting table, smithing menu, stonecutter, and manual ingredient insertion into furnace-like menus.
blocked_menu_classes matches an exact menu class name. blocked_menu_packages matches any menu class whose fully-qualified name starts with the configured prefix. blocked_menu_types matches the registered MenuType id when one exists.
blocked_block_ids matches the placed block id itself, such as create:mechanical_crafter. blocked_block_classes matches the runtime block class. blocked_block_entity_classes and blocked_block_entity_packages are for interaction-driven machines that expose a block entity but not a normal menu.
Active in-game effects of blocked item rules:
- Block using the item directly.
- Block placing blocked blocks and using blocked tools or weapons.
- Clear blocked crafting results in the player crafting grid and crafting table.
- Block configured recipe ids in the player crafting grid, crafting table, smithing menu, stonecutter, and manual ingredient insertion into furnace-like menus.
- Block manually inserting blocked items into non-player menu slots, including many modded tables and terminals.
- Close configured blocked menus automatically when a player without the required stage opens them.
- Deny interaction with configured interaction-driven blocks such as
create:mechanical_crafter, even when they do not open a normal menu.
- Deny smithing or anvil operations that use blocked inputs.
- Block taking blocked outputs from result-like menu slots before they can be moved into directly usable player slots.
- Remove blocked items from the hotbar, offhand, armor, and supported Curios slots by moving them to the main inventory or dropping them if it is full.
- Prevent blocked items from running normal player inventory ticking while they stay in the main inventory.
- Filter blocked items out of loot generated for that player.
OtherStages stays player-based. Automation from other mods can still create blocked items, but blocked players cannot keep them in directly usable slots, cannot use them manually, and cannot manually feed blocked recipe ingredients into many menu-driven machine screens.
blocked_mobs.json
Blocks natural spawning and nearby spawn attempts for the listed entities.
{
"blocked_mobs": [
"minecraft:enderman",
"minecraft:warden"
]
}
blocked_structures.json
Blocks entering and interacting inside listed structures.
{
"blocked_structures": [
"minecraft:stronghold",
"minecraft:ancient_city"
]
}
Minecraft 1.20.1 uses separate IDs for many village variants, so include each variant you want to block.
blocked_dimensions.json
Blocks travel to listed dimensions.
{
"blocked_dimensions": [
"minecraft:the_nether",
"minecraft:the_end"
]
}
If teleportOnInvalidDimension is enabled in otherstages-server.toml, players found inside a restricted dimension can be moved back to safety on login.
If a player's respawn point is set inside a blocked dimension, the respawn target is reset to the Overworld.
blocked_villager_trades.json
Blocks villager trades by profession and level.
Supported fields per entry:
profession
level
min_level
max_level
profession accepts:
- a profession ID such as
minecraft:librarian
*
any
- empty / null
Example:
{
"blocked_villager_trades": [
{
"profession": "*",
"min_level": 2,
"max_level": 5
},
{
"profession": "minecraft:cleric",
"level": 1
}
]
}
If a villager has both allowed and blocked trades, the trading screen opens with only the accessible offers. If nothing is accessible, the player receives a warning instead.
progression.json
Defines how a player unlocks the stage.
Supported condition types:
advancement
item_count
experience
dimension
kill_count
craft_count
ftb_quest
and
or
Example:
{
"unlock_conditions": {
"type": "AND",
"conditions": [
{ "type": "advancement", "advancement": "minecraft:story/enter_the_nether" },
{ "type": "item_count", "item": "minecraft:blaze_rod", "count": 8, "consume": true },
{ "type": "dimension", "dimension": "minecraft:the_nether" }
]
},
"next_stage": "end_access"
}
next_stage is optional. It can be useful as documentation for your own stage chain, but the actual unlock logic is driven by unlock_conditions.
How progression checks run
The mod reevaluates progression automatically when useful events happen, including:
- player login
- player tick with cooldown
- advancement completion
- interaction
- kills
- crafting
- item pickup
- dimension change
You can also force a recheck with:
/otherstages check <player>
Commands
All commands are under /otherstages and require permission level 2.
Stage inspection
/otherstages stage list
/otherstages stage <stage_name> info
/otherstages player <target> info
Stage management
/otherstages player <target> add <stage>
/otherstages player <target> remove <stage>
/otherstages player <target> clear
/otherstages player <target> reset
reset now uses the defaultStartingStage value from config/otherstages-server.toml.
Progression and reload
/otherstages check <player>
/otherstages reload
/otherstages cache clear
/otherstages cache info
cache info prints current item cache entries, tracked players, hits, misses, invalidations, and hit rate.
Debug helpers
/otherstages debug item
/otherstages debug menu
/otherstages debug block
/otherstages debug stages
/otherstages dimension check <player> <dimension>
/otherstages dimension list <player>
debug menu prints the current open menu when one exists, or the last remembered non-player menu after you close it. It shows the class, package, registered menu type, whether the current player is blocked from it, the required stage when applicable, and copy-ready blocked_menu_* snippets. It also suggests which key is usually the best fit for the current screen.
debug block inspects the block you are looking at. It is useful for systems like Create where interaction can be block-driven instead of menu-driven. It now prints copy-ready blocked_block_* snippets and suggests the most stable key to use. If the block does not look menu-based, blocked_menu_* is probably not the right lever.
Client-side behavior
Unlock overlay
When a stage is granted, the client receives a stage unlock notification that uses:
display_name
description
icon
color
This is the current generic overlay format. It does not depend on stage names like stone_age, iron_age, or diamond_age.
Tooltips
Blocked items add a tooltip line telling the player which stage is required.
JEI / REI
If JEI or REI is installed, blocked items are hidden for each player according to that player's unlocked stages.
Dimension and structure warnings
- Restricted dimensions use a warning overlay and optional safety teleport.
- Restricted structures use warning overlays plus hard interaction blocking.
Server config
Main server config file:
config/otherstages-server.toml
Important options:
enableStageMode
enableTooltips
enableWarnings
warningDuration
teleportOnInvalidDimension
defaultStartingStage
enableDebugLogging
cacheSize
defaultStartingStage is currently used by /otherstages player <target> reset. It is not automatically granted to every new player on first login in the current code path.
Stage Analyzer
The mod includes the otherstages:stage_analyzer item.
Usage:
- Give yourself the item.
- Sneak + right-click a storage block.
- The mod scans the contents and writes JSON lines to
config/otherstages/generated/.
- Copy the generated lines into your
blocked_items.json.
The analyzer supports vanilla containers and many modded storage systems through direct support or reflective fallbacks.
If the clicked block is not a supported container, the analyzer falls back to a block inspection readout with the block ID and state properties.
Notes and current scope
- This README documents the loader-backed stage files that are active in the current code path.
- Internal scaffolding exists for some future restriction types, but this README only documents features that are currently enforced in gameplay.
stage_info.json is required for each stage.
- The folder name is the internal stage ID.
- Higher
order means higher progression tier.
- If a stage should behave as a later tier, give it a larger
order.
- Use
/otherstages reload after editing JSON files.
评论 0
登录后参与评分
还没有评论,来抢沙发吧