docs: 移动说明信息至 README
This commit is contained in:
@@ -1,7 +1,26 @@
|
|||||||
# wheat-server-kubejs
|
# wheat-server-kubejs
|
||||||
|
|
||||||
## Links
|
## 相关链接
|
||||||
|
|
||||||
- [KubeJS - Official Website](https://kubejs.com/)
|
- [KubeJS - Official Website](https://kubejs.com/)
|
||||||
- [KubeJS - Mods - Modrinth](https://modrinth.com/mod/kubejs)
|
- [KubeJS - Mods - Modrinth](https://modrinth.com/mod/kubejs)
|
||||||
- [Prunoideae / ProbeJS](https://github.com/Prunoideae/ProbeJS)
|
- [Prunoideae / ProbeJS](https://github.com/Prunoideae/ProbeJS)
|
||||||
|
|
||||||
|
## 注意事项
|
||||||
|
|
||||||
|
- 暂不支持解构赋值(2022-08-28)
|
||||||
|
- 暂不支持设置函数参数默认值(2022-08-28)
|
||||||
|
- 暂不支持 try catch(2022-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)
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
// priority: 100
|
// priority: 100
|
||||||
|
|
||||||
// 注意事项:
|
|
||||||
// - 暂不支持解构赋值(2022-08-28)
|
|
||||||
// - 暂不支持设置函数参数默认值(2022-08-28)
|
|
||||||
// - 暂不支持 try catch(2022-08-28)
|
|
||||||
|
|
||||||
// 自定义方块:
|
|
||||||
// https://mods.latvian.dev/books/kubejs/page/custom-blocks
|
|
||||||
|
|
||||||
global.defaults = function (v, d) {
|
global.defaults = function (v, d) {
|
||||||
(typeof d === 'undefined') && (d = null);
|
(typeof d === 'undefined') && (d = null);
|
||||||
return ((typeof v === 'undefined' || v === null) ? d : v);
|
return ((typeof v === 'undefined' || v === null) ? d : v);
|
||||||
|
|||||||
Reference in New Issue
Block a user