diff --git a/README.md b/README.md index 8531ff1..4d66891 100644 --- a/README.md +++ b/README.md @@ -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 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) diff --git a/kubejs/startup_scripts/_main_.js b/kubejs/startup_scripts/_main_.js index c73905c..4f974f8 100644 --- a/kubejs/startup_scripts/_main_.js +++ b/kubejs/startup_scripts/_main_.js @@ -1,13 +1,5 @@ // 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) { (typeof d === 'undefined') && (d = null); return ((typeof v === 'undefined' || v === null) ? d : v);