zh_cn:documentation:fabric_mod_json
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
zh_cn:documentation:fabric_mod_json [2021/09/01 08:12] – [依赖解析] solidblock | zh_cn:documentation:fabric_mod_json [2024/01/02 10:33] (current) – ↷ Page name changed from zh_cn:documentation:fabric_mod_json_spec to zh_cn:documentation:fabric_mod_json solidblock | ||
---|---|---|---|
Line 5: | Line 5: | ||
* **schemaVersion** 用于内部机制。总是为 '' | * **schemaVersion** 用于内部机制。总是为 '' | ||
- | * **id** 定义模组的 id——由字母、数字、下划线组成的字符串,长度为 1 到 63。。 | + | * **id** 定义模组的 id——由字母、数字、下划线组成的字符串,长度为 1 到 63。 |
* **version** 定义模组版本——字符串值,建议符合 [[https:// | * **version** 定义模组版本——字符串值,建议符合 [[https:// | ||
Line 12: | Line 12: | ||
==== 模组加载 ==== | ==== 模组加载 ==== | ||
+ | * **provides**:定义了提供的模组的 id 的列表,可以看做模组的别称。Fabric Loader 将会认为这些 id 的模组是存在的。如果存在其他使用这个 id 的模组,这些模组会直接不加载。 | ||
* **environment**:定义了模组在哪里运行:只在客户端(客户端模组),或只在服务端(插件),或二者(常规模组)。包含环境标识符: | * **environment**:定义了模组在哪里运行:只在客户端(客户端模组),或只在服务端(插件),或二者(常规模组)。包含环境标识符: | ||
- | * **'' | + | * **'' |
* **client** 运行在客户端。 | * **client** 运行在客户端。 | ||
- | * **server** 运行在服务端。 | + | * **server** 运行在服务器。 |
* **entrypoints** 定义了你的模组的要加载的主要的类。 | * **entrypoints** 定义了你的模组的要加载的主要的类。 | ||
* 你的模组有三种默认的入口点: | * 你的模组有三种默认的入口点: | ||
* **main** 会先运行。用于实现了 '' | * **main** 会先运行。用于实现了 '' | ||
* **client** 仅在客户端,会随后运行。用于实现了 '' | * **client** 仅在客户端,会随后运行。用于实现了 '' | ||
- | * **server** 仅在服务端,会随后运行。用于实现了 '' | + | * **server** 仅在服务端,会随后运行。用于实现了 '' |
* 每个入口点都可以包含多个需要加载的模组。类(或者方法,或者静态字段)可以用两种方式定义: | * 每个入口点都可以包含多个需要加载的模组。类(或者方法,或者静态字段)可以用两种方式定义: | ||
* 如果使用Java,列举类(或者其他)的完整名称。例如:< | * 如果使用Java,列举类(或者其他)的完整名称。例如:< | ||
Line 30: | Line 31: | ||
* 如果你使用其他语言,参考该语言的文档。Kotlin 的位于 [[https:// | * 如果你使用其他语言,参考该语言的文档。Kotlin 的位于 [[https:// | ||
- | * **jars** 你的模组 JAR 中需要加载的嵌套 JAR。使用此字段前,请参考[[zh_cn: | + | * **jars** 你的模组 JAR 中需要加载的嵌套 JAR。使用此字段前,请参考[[zh_cn: |
" | " | ||
{ | { | ||
Line 68: | Line 69: | ||
==== 元数据 ==== | ==== 元数据 ==== | ||
- | * **name** | + | * **name** |
- | * **description** | + | * **description** |
- | * **contact** | + | * **contact** |
- | * **email** | + | * **email** |
- | * **irc** IRC channel pertaining to the mod. Must be of a valid URL format - for example: | + | * **irc** |
- | * **homepage** | + | * **homepage** |
- | * **issues** | + | * **issues** |
- | * **sources** | + | * **sources** |
- | * The list is not exhaustive - mods may provide additional, non-standard keys (such as **discord**, **slack**, **twitter**, etc) - if possible, they should be valid URLs. | + | * 本列表并未列举尽——模组也许会提供额外的、非标准的键(例如 |
- | * **authors** | + | * **authors** |
- | * **name** | + | * **name** |
- | * **contact** | + | * **contact** |
- | * **contributors** | + | * **contributors** |
- | * **license** | + | * **license** |
- | * This should provide the complete set of preferred licenses conveying the entire mod package. In other words, compliance with all listed licenses should be sufficient for usage, redistribution, | + | * 应该提供完整的一套受推荐的包含整个模组包的许可协议。换句话说,遵守所有列举的协议应该足够明确整个模组包的使用、分发等。 |
- | * For cases where a part of code is dual-licensed, | + | * 对于代码有部分受双协议影响的情况,选择受推荐的协议。 |
* To aid automated tools, it is recommended to use [[https:// | * To aid automated tools, it is recommended to use [[https:// | ||
- | * **icon** | + | * **icon** |
- | * A path to a single | + | * 到单个 |
- | * A dictionary of images widths to their files' paths. | + | * 宽度映射到文件路径的字典。 |
===== 自定义字段 ===== | ===== 自定义字段 ===== | ||
- | You can add any field you want to add inside | + | 您可以在 |
zh_cn/documentation/fabric_mod_json.1630483974.txt.gz · Last modified: 2021/09/01 08:12 by solidblock