1
0

refactor: 优化方块注册代码,将设置方块属性操作提取为函数

This commit is contained in:
2022-08-28 19:18:53 +08:00
parent f413782a58
commit 39368b06b4
3 changed files with 170 additions and 83 deletions
+14
View File
@@ -1,5 +1,19 @@
declare const global: {
/**
* @desc 传入值为空时返回指定的默认值
* @param v 传入值
* @param d 默认值
*/
defaults<TValue>(v: TValue, d: TValue): TValue;
/**
* @desc 写入 JSON 文件
* @param path 文件路径,相对于 `.minecraft`
* @param data JSON 内容对象
*/
writeJSON(path: string, data: object): void;
/** 颜色列表 */
COLORS: {
[key: string]: {