此模组非常简单,且具有非常明确的用途:它允许整合包制作者隐藏来自图纸台的图纸。
需要隐藏的图纸应放置在 schematics 文件夹内的 locked 子文件夹中。路径格式如下:<实例目录>/schematics/locked/<图纸名称>.nbt。
然后,你可以使用本模组添加的命令来解锁该图纸:
/schematic unlock <蓝图名称>[.nbt]
-
图纸名称可以带有 .nbt 扩展名,也可以不带。
-
如果 schematics 文件夹中已存在同名图纸,则不会进行替换。玩家会收到提示,告知该图纸已被解锁。
-
基于上述原因,你的锁定图纸应使用较为独特的名称,以避免与用户自定义的图纸发生冲突。
-
该命令需要更高的权限级别:开启作弊、OP 权限、服务器所有者等。
懂行的朋友可能已经猜到它是如何工作的。没错,它只是将文件从一个文件夹复制到另一个文件夹。
示例:
在任务完成时解锁蓝图:
onEvent('ftbquests.completed', event => {
event.server.runCommandSilent(`execute at ${event.player.id} as ${event.player.id} run schematic unlock pillar`)
})
Create 不需要作为依赖项安装。但显然,没有它模组就毫无意义。
如果你的整合包需要某个功能,欢迎随时提出建议。
喜欢这个模组吗?您的支持将不胜感激!
This mod is very simple and has a very specific use: it allows modpack makers to hide schematics from the Schematic Table.
Locked schematics should be placed in locked folder inside the schematics folder. The path would look like this: <instance>/schematics/locked/<schematic name>.nbt.
Then, to unlock the schematic you would use the command this mod adds:
/schematic unlock <schematic name>[.nbt]
- Schematic name can be with .nbt extensions or without.
- If schematic with same name already exists in the schematics folder, it will not be replaced. Player will receive a message that schematic is already unlocked.
- Due to the reason above - your locked schematics should have somewhat unique name, to avoid conflicts with user-created schematics.
- Command requires elevated permission level: cheats enabled, op, server owner, etc...
Knowledgeable folks may have already guessed how this works. Yes, it just copies the file from one folder to another.
Example:
Unlocks the schematic on quest completion:
onEvent('ftbquests.completed', event => {
event.server.runCommandSilent(`execute at ${event.player.id} as ${event.player.id} run schematic unlock pillar`)
})
Create is not required as a dependency. But, obviously, mod is pointless without it.
Feel free to suggest a feature, if you need it for your modpack.
Enjoying the mod? Your support would be greatly appreciated!
评论 0
登录后参与评分
还没有评论,来抢沙发吧