1
0

docs: 移动说明信息至 README

This commit is contained in:
2022-09-12 16:09:12 +08:00
parent e7303138bb
commit 31880d494e
2 changed files with 20 additions and 9 deletions

View File

@@ -1,7 +1,26 @@
# wheat-server-kubejs
## Links
## 相关链接
- [KubeJS - Official Website](https://kubejs.com/)
- [KubeJS - Mods - Modrinth](https://modrinth.com/mod/kubejs)
- [Prunoideae / ProbeJS](https://github.com/Prunoideae/ProbeJS)
## 注意事项
- 暂不支持解构赋值2022-08-28
- 暂不支持设置函数参数默认值2022-08-28
- 暂不支持 try catch2022-08-28
## 参考资料
### Wiki
- [自定义方块](https://mods.latvian.dev/books/kubejs/page/custom-blocks)
## 代码
- [KubeJS-Mods / KubeJS](https://github.com/KubeJS-Mods/KubeJS)
- [BlockBuilder.java](https://github.com/KubeJS-Mods/KubeJS/blob/1.18/main/common/src/main/java/dev/latvian/mods/kubejs/block/BlockBuilder.java)
- [BasicBlockJS.java](https://github.com/KubeJS-Mods/KubeJS/blob/1.18/main/common/src/main/java/dev/latvian/mods/kubejs/block/custom/BasicBlockJS.java)
- [WoodenButtonBlockBuilder.java](https://github.com/KubeJS-Mods/KubeJS/blob/1.18/main/common/src/main/java/dev/latvian/mods/kubejs/block/custom/WoodenButtonBlockBuilder.java)

View File

@@ -1,13 +1,5 @@
// priority: 100
// 注意事项:
// - 暂不支持解构赋值2022-08-28
// - 暂不支持设置函数参数默认值2022-08-28
// - 暂不支持 try catch2022-08-28
// 自定义方块:
// https://mods.latvian.dev/books/kubejs/page/custom-blocks
global.defaults = function (v, d) {
(typeof d === 'undefined') && (d = null);
return ((typeof v === 'undefined' || v === null) ? d : v);