指南、配方和故障排除:GitHub Wiki
Chapters 将物品、流体、配方和维度锁定在**阶段(stages)**之后,直到你授予它们。
阶段是一个你选择的 ID,例如 mypack:iron_age。/chapters 命令、KubeJS 以及 FTB Quests 的阶段字段都使用相同的 ID。
该 jar 包不附带任何阶段。你需要自行编写。Chapters 独立运行。下面的示例均基于 KubeJS 编写。如果你不想使用脚本,也可以编写数据包。JEI、FTB Quests、FTB Teams 和 Mekanism 为可选组件。
你可以锁定的内容
- 物品。 在 JEI 中隐藏,无法在地面拾取,不会从背包掉落(约每秒一次),无法在原版合成表中合成。
- 流体。 玩家无法放置或使用桶和储罐移动它们。JEI 会隐藏它们。
- 单个配方。 该配方的 ID 将无法在原版合成表中合成,且 JEI 会隐藏它。除非你也锁定了输出物品,否则输出物品保持可用。
- 维度。 旅行将被取消(传送门、
/tp)。已经身处其中的玩家会被送回主世界(Overworld)。 - 整个模组。
@create会锁定该模组的物品、流体和 Mekanism 化学品。它不会锁定维度。如需锁定维度,请添加一行dimension:。 - Mekanism 化学品。 仅在安装 Mekanism 的 Minecraft 1.21 版本中生效。玩家无法手动移动它们。JEI 会隐藏它们。
你可以放宽锁定限制(使其在 JEI 中可见,或允许玩家持有物品)。Restriction flags wiki 页面展示了具体方法。大多数整合包应保留默认设置:完全锁定,直到授予相应阶段。
示例
安装 KubeJS。将此代码放入 kubejs/server_scripts/stages.js:
ServerEvents.loaded(() => {
ChaptersEvents.defineStage('mypack:iron_age', [
'@create',
'dimension:minecraft:the_nether'
])
})
重载服务器脚本,然后执行:
/chapters check Steve mypack:iron_age
/chapters add Steve mypack:iron_age
在授予该阶段之前,Create 模组的内容以及下界(Nether)均不可用。
配合 FTB Quests,添加一个阶段奖励并输入 mypack:iron_age。无需额外插件。使用 FTB Teams 时,整个队伍都会获得该阶段。
更多配方示例(单个物品、标签、流体、单个配方、软锁定):请参阅 wiki。
仍然可行的操作
- 锻造台、机械制造机等机器仍可合成。如果必须禁止这些机器的合成,请同时锁定相关物品。
- 管道和其他自动化系统仍可移动锁定的流体和化学品。但玩家点击储罐的操作会被阻止。
- Mekanism 化学品的锁定仅适用于 Minecraft 1.21(Chapters 1.x)。Chapters 2.x(Minecraft 26)会忽略
chemical:条目。
命令
/chapters add、remove、list、check、reload
版本
| Minecraft | Jar |
|---|---|
| 1.21 (NeoForge 21.1, Java 21) | Chapters 1.x |
| 26 (NeoForge 26.1, Java 25) | Chapters 2.x |
链接
- GitHub:
- Releases:
- License: MIT
Guide, recipes, and troubleshooting: GitHub Wiki
Chapters locks items, fluids, recipes, and dimensions behind stages until you grant them.
A stage is an id you choose, like mypack:iron_age. The /chapters commands, KubeJS, and the FTB Quests Stage fields all use that same id.
The jar ships no stages. You write them. Chapters runs on its own. KubeJS is the way the examples below are written. A datapack works if you do not want scripts. JEI, FTB Quests, FTB Teams, and Mekanism are optional.
What you can lock
- Items. Hidden in JEI, no ground pickup, dropped from the inventory (about once a second), no crafting on the vanilla grid.
- Fluids. The player cannot place them or move them with buckets and tanks. JEI hides them.
- One recipe. That recipe id will not craft on the vanilla grid, and JEI hides it. The output item stays free unless you also lock the item.
- Dimensions. Travel is cancelled (portals,
/tp). Players already inside are sent back to the Overworld. - A whole mod.
@createlocks that mod's items, fluids, and Mekanism chemicals. It does not lock dimensions. Add adimension:line for those. - Mekanism chemicals, on Minecraft 1.21 when Mekanism is installed. The player cannot move them by hand. JEI hides them.
You can soften a lock (keep it visible in JEI, or let the player hold the item). The wiki page Restriction flags shows how. Most packs should leave the defaults: fully locked until the stage is granted.
Example
Install KubeJS. Put this in kubejs/server_scripts/stages.js:
ServerEvents.loaded(() => {
ChaptersEvents.defineStage('mypack:iron_age', [
'@create',
'dimension:minecraft:the_nether'
])
})
Reload server scripts, then:
/chapters check Steve mypack:iron_age
/chapters add Steve mypack:iron_age
Nothing from Create, and no Nether, until that stage is granted.
With FTB Quests, add a Stage Reward and type mypack:iron_age. No extra plugin. With FTB Teams, the whole party gets the stage.
More recipes (one item, a tag, fluids, a single recipe, a soft lock): the wiki.
What stays possible
- Smithing tables, mechanical crafters, and other machines can still craft. Lock the item as well when those must stay closed.
- Pipes and other automation can still move locked fluids and chemicals. A player clicking a tank is blocked.
- Mekanism chemicals are gated on Minecraft 1.21 only (Chapters 1.x). Chapters 2.x (Minecraft 26) ignores
chemical:entries.
Commands
/chapters add, remove, list, check, reload
Versions
| Minecraft | Jar |
|---|---|
| 1.21 (NeoForge 21.1, Java 21) | Chapters 1.x |
| 26 (NeoForge 26.1, Java 25) | Chapters 2.x |
Links
- GitHub:
- Releases:
- License: MIT
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
下载 Chapters
章节 1.6
变更
- FTB Teams,已移除的阶段:通过
/chapters remove、FTB Quests 或 KubeJS 移除的阶段,在离开并重新加入世界后将不再恢复。此前由团队同步处理时,玩家文件中遗留的阶段会在每次登录时被复制回团队。现在,一旦该阶段存在于团队中(在登录或加入队伍时),此副本将被清除;执行移除操作也会将其删除。在已经出现过此问题的世界中,旧阶段会在首次使用此版本登录时最后一次出现:再次移除它们后,它们将永久消失。 - KubeJS
stages.remove:在启用团队同步的情况下,仅当团队实际拥有该阶段时才返回true。
第 1.5 章
更新内容
- 大型整合包:锁定检查、JEI 的隐藏与显示、合成以及阶段同步的速度更快。发送给客户端的阶段索引是一个更小的按命名空间分组的负载,因此客户端和服务器需要相同的版本。
- 原版桶:当流体具有
preventTransfer(防止转移)属性时,现在会取消填充或倒空桶的操作。此前仅限制了罐体和FluidUtil的转移,因此正常点击桶仍可能移动被锁定的流体,直到库存审计将桶移除为止。
章节 1.4
变更
- 重生后的 JEI:死亡后,已解锁的物品和配方会保持可见,包括离开末地时。阶段同步现在在新玩家实体存在后才运行一次,而不是与死亡副本竞争并发送一个空阶段集合(这会导致所有内容重新隐藏并使客户端卡住)。
- JEI 运行时更新:在同一刻内隐藏和显示的操作只应用一次。物品、流体和化学物品的添加或移除在每个类型中仅通过一次 JEI 调用完成,并且解锁大型阶段会在一次遍历中揭示其配方。
/reload和重新登录时,每种类型仅输出一行日志,而不是每个物品一行。
章节 2.2
变更
- 限制标志:在数据包 / KubeJS 阶段中,可选的
restrictions对象以及每条目的覆盖选项(hideInJei、preventPickup、dropFromInventory、preventCraft、preventTransfer、preventTravel)。对于旧版 JSON 文件,默认设置仍会完全生效。 - FTB Teams 配置:
config/chapters-common.toml→syncWithFtbTeams(默认值为true);在安装 FTB Teams 的情况下,将其设置为false可实现每个玩家独立的独立阶段模式。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧