-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
113 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
{ | ||
"hash": "24352143", | ||
"configHash": "bd1e298f", | ||
"hash": "cc4aaa53", | ||
"configHash": "c7e68496", | ||
"lockfileHash": "657949f7", | ||
"browserHash": "275bbd23", | ||
"browserHash": "eaee6cc0", | ||
"optimized": { | ||
"vue": { | ||
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/vue/dist/vue.runtime.esm-bundler.js", | ||
"file": "vue.js", | ||
"fileHash": "dec94417", | ||
"fileHash": "1ad5d986", | ||
"needsInterop": false | ||
}, | ||
"vitepress > @vue/devtools-api": { | ||
"src": "../../../../node_modules/.pnpm/@[email protected]/node_modules/@vue/devtools-api/dist/index.js", | ||
"file": "vitepress___@vue_devtools-api.js", | ||
"fileHash": "c3f51ca5", | ||
"fileHash": "7578b930", | ||
"needsInterop": false | ||
}, | ||
"vitepress > @vueuse/core": { | ||
"src": "../../../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vueuse/core/index.mjs", | ||
"file": "vitepress___@vueuse_core.js", | ||
"fileHash": "6ec7a515", | ||
"fileHash": "731427e6", | ||
"needsInterop": false | ||
}, | ||
"vitepress > @vueuse/integrations/useFocusTrap": { | ||
"src": "../../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vueuse/integrations/useFocusTrap.mjs", | ||
"file": "vitepress___@vueuse_integrations_useFocusTrap.js", | ||
"fileHash": "13de43f6", | ||
"fileHash": "e8e1179a", | ||
"needsInterop": false | ||
}, | ||
"vitepress > mark.js/src/vanilla.js": { | ||
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/mark.js/src/vanilla.js", | ||
"file": "vitepress___mark__js_src_vanilla__js.js", | ||
"fileHash": "2279df2d", | ||
"fileHash": "651eef88", | ||
"needsInterop": false | ||
}, | ||
"vitepress > minisearch": { | ||
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/minisearch/dist/es/index.js", | ||
"file": "vitepress___minisearch.js", | ||
"fileHash": "eb264697", | ||
"fileHash": "4ebbb488", | ||
"needsInterop": false | ||
}, | ||
"@theme/index": { | ||
"src": "../../../../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitepress/dist/client/theme-default/index.js", | ||
"file": "@theme_index.js", | ||
"fileHash": "2872f18a", | ||
"fileHash": "37aaf77b", | ||
"needsInterop": false | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,5 +21,5 @@ features: | |
details: 一份代码,多版本支持,无需担心Mojang的一周一改 | ||
- title: 无缝集成 | ||
details: 强大的MNI框架,基于数据包编译期,提供更多的可能 | ||
--- | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
lastUpdated: true | ||
--- | ||
|
||
# 文档注释<Badge type="tip">未来特性</Badge> | ||
|
||
作为MCFPP中的第三种注释,文档注释可以用来给你的项目自动生成一份文档。MCFPP的文档注释是标签语法和Markdown的混合体,你可以使用标签注释来提供必要的关键信息,同时用Markdown来书写详细的文档内容。 | ||
|
||
## 语法 | ||
|
||
文档注释使用`#{`开头,以`#}`结束,其中即为文档注释。文档注释的每一行可以使用`#`开头,`#`不会被作为注释的一部分。 | ||
|
||
标签注释必须写在Markdown之前。 | ||
|
||
文档注释可以写在任何声明的上方,但是局部变量的文档注释不会被提取到生成的文档中,仅用于IDE的提示。 | ||
|
||
以下是一个文档注释的例子: | ||
|
||
```mcfpp | ||
#{ | ||
@base 苦力怕 | ||
超级苦力怕的实现类 | ||
}# | ||
@Base<"creeper"> | ||
class SuperCreeper{ | ||
#{ | ||
苦力怕会给予的效果列表 | ||
}# | ||
list effectList = ["wither", "poison", "slowness", "hunger", "blindness", "weakness"]; | ||
#{ | ||
@return 一个随机效果 | ||
获取一个随机效果 | ||
}# | ||
func getEffect() -> string { | ||
return effectList.random(); | ||
} | ||
override func tick(){ | ||
if(@a[distance = 0..5].exist()){ | ||
effect(@a[distance = 0..5], getEffect(), 1, 10); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## 标签 | ||
|
||
有些标签只能用于实体模板,有些只能用于函数,有些则只能用于变量或者成员,还有一些是通用的。 | ||
|
||
### 通用标签 | ||
|
||
- `@see 引用`:指定参考的文档。 | ||
- `@since 版本`:指定从哪个版本开始引入的。 | ||
- `@deprecated 版本`:指定从哪个版本开始废弃的。 | ||
- `@version 版本`:指定版本号。 | ||
- `@author 作者`:指定作者。 | ||
|
||
### 实体模板标签 | ||
|
||
- `@base 描述`:指定实体的基实体。 | ||
- `@param 泛型参数名 描述`:指定泛型参数的描述。 | ||
|
||
### 函数标签 | ||
|
||
- `@return 描述`:指定返回值的描述。 | ||
- `@throws 异常 描述`:指定抛出的异常的描述。 | ||
- `@param 参数 描述`:指定参数的描述。 | ||
- `@context <entity|pos|rotation|dimension> 描述`:指定上下文的描述。一般是函数的执行环境。 |