本模组是 MCFDoc 的封装,后者是一个由我开发的、具有通用语法的开源数据包文档生成器。你可以在此处阅读其相关文档。
本模组让你能够通过游戏内图形用户界面(GUI)轻松使用它。
要打开 GUI,请使用 /mcfdoc 命令。
使用方法
在 GUI 中,名为 Datapack Name/Path 的文本字段必须包含数据包的名称或路径。如果仅提供了名称,它将搜索当前世界目录中具有该名称的数据包。否则,必须提供完整文件路径。
名为 Output Path 的文本字段应包含将要生成的文件的完整文件路径。这应包括将写入的文件,例如 /home/me/Documents/output.html。

底部的按钮 Open In Browser 决定生成的文档是否应在浏览器中自动打开。
完成后,按下 Compile 按钮!如果其中一个必填字段为空,将会弹出一个提示框(你可以点击它来关闭)。
故障排除
当生成过程中发生错误时,你会在聊天栏收到通知,并提供修复方法或问题所在位置。
Prism Launcher 用户
某些 Minecraft 安装会被沙盒化,以防止访问文件系统中不相关的部分。Prism Launcher 在 Linux 上以 Flatpak 形式安装时会被沙盒化,因此你可能会遇到“未找到数据包”错误或向文件写入输出时的错误。如果遇到这种情况,你可以为 Prism Launcher 授予额外权限,或者确保数据包和输出文件都位于 minecraft 目录内。
任何“文件未找到”或“无法写入文件”的情况通常都是由于缺乏访问权限导致的。
其他信息
文档语法与 Imp-Doc 类似,你可能对此感兴趣。
MCFDoc 在 AGPL-3.0 许可下开源,任何人都可以贡献代码。
This mod is a wrapper for MCFDoc which is an open source documentation generator for datapacks with a general syntax, made by me. You can read documentation for it here.
This mod lets you use it very easily through an ingame GUI.
To open the GUI, use the /mcfdoc command.
How to Use
In the GUI, the text field named Datapack Name/Path must contain the name or location of the datapack. If just a name is given, it will search for a datapack in the current worlds directory with that name. Otherwise, the full filepath must be given.
The text field named Output Path should contain the full filepath to the file which will be generated. This should include the file that will be written to, for example /home/me/Documents/output.html.

The button at the bottom, Open In Browser, determines whether the generated document should be automatically opened in your browser.
Once you have finished, press the Compile button! If one of the essential fields is left empty a pop up (which you can click on to close) will appear.
Troubleshooting
When an error occurs during generation, you will be notified in chat and either a fix or the location of the problem will be given.
Prism Launcher Users
Some installations of Minecraft are sandboxed to prevent access to irrelevant parts of your filesystem. Prism Launcher, when installed on Linux as a Flatpak is sandboxed and so you may encounter a datapack not found error or an error when writing the output to a file. If this is the case then you can give Prism Launcher extra permissions, or you could ensure both the datapack and output are within the minecraft directory.
Any file not found / failure to write to a file generally are due to lack of access permissions.
Extra
The documentation syntax is similar to Imp-Doc, which may be of interest.
MCFDoc is open source under the AGPL-3.0 license and so anyone can contribute.
评论 0
登录后参与评分
还没有评论,来抢沙发吧