zh_cn:tutorial:tags
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
zh_cn:tutorial:tags [2021/07/26 00:28] – created solidblock | zh_cn:tutorial:tags [2022/12/16 02:40] – solidblock | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== 标签示例 ===== | ===== 标签示例 ===== | ||
- | 文件位置:'' | + | 文件位置:'' |
<code javascript> | <code javascript> | ||
{ | { | ||
" | " | ||
" | " | ||
- | "examplemod: | + | "tutorial: |
] | ] | ||
} | } | ||
</ | </ | ||
- | ''" | + | ''" |
+ | |||
+ | 如需注册标签并在代码中使用,你需要这样使用: | ||
+ | === 1.19.3 及以上 === | ||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final TagKey< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === 1.19.2 及以下 === | ||
+ | |||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final TagKey< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === 1.18.1 及以下(需要 Fabric API) === | ||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final Tag< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === 1.17 及以下,不含 1.17.1(需要 Fabric API) === | ||
+ | < | ||
+ | public class ModBlockTags { | ||
+ | public static final Tag< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | 注意 '' | ||
===== 常见标签和模组标签 ===== | ===== 常见标签和模组标签 ===== |
zh_cn/tutorial/tags.txt · Last modified: 2023/08/15 01:30 by wjz_p