KubeGroovy
KubeGroovy(WIP wiki)是 KubeJS 的一个分支,它运行 Groovy 脚本(Groovy 6.x)而非 JavaScript。
注意:如果你是脚本开发者(例如整合包开发者、服务器管理员等),请查看游戏目录中的 kubegroovy/ 文件夹以及示例 main.groovy 文件以开始使用。
简介
KubeGroovy 是一个 Minecraft 模组,允许你使用 Groovy 编程语言创建脚本来管理你的服务器,包括通过事件处理、修改配方、添加战利品表、自定义世界生成、添加新方块和物品,或与其他模组进行自定义集成以实现更高级的功能!
脚本位于 kubegroovy/ 游戏目录中:
startup_scripts/ - 在游戏启动时加载一次(.groovy 文件,支持 // priority: N、// requires: <modid> 头部声明)
server_scripts/ - 通过 /reload 重新加载
client_scripts/ - 通过 F3+T 重新加载
事件会被发布到 Groovy 闭包中,例如:
KubeGroovy 脚本绑定使用 $ 前缀,因此导入的类保持其无前缀的名称。
$ServerEvents.recipes { event ->
event.shaped('minecraft:diamond', ['AAA', 'AAA', 'AAA'], [A: 'minecraft:dirt'])
}
问题与反馈
如果你认为发现了模组的 Bug 或希望请求新功能,欢迎在 GitHub 上提交 Issue!
许可证
KubeGroovy 根据 GNU 宽通用公共许可证 v3.0(LGPLv3)分发。有关更多信息,请参阅我们的 LICENSE 文件。上游 KubeJS 同样采用 LGPLv3 许可证,详细信息请参见原始仓库。
创建插件(WIP)
为 KubeGroovy 做出贡献
入门指南
如果你想为 KubeGroovy 做出贡献,请使用 Git 克隆该仓库,并使用你选择的 IDE 导入 Gradle 项目!
构建
从源代码构建 KubeGroovy 应该相当简单,只需在项目根目录运行 gradlew build,jar 文件就会出现在 build/libs 目录中。
KubeGroovy
KubeGroovy (WIP wiki) is a fork of KubeJS that runs Groovy scripts (Groovy 6.x) instead of JavaScript.
Note: If you are a script developer (i.e. pack dev, server admin, etc.), check the kubegroovy/ folder in your game directory and the example main.groovy files to get started.
Introduction
KubeGroovy is a Minecraft mod which lets you create scripts in the Groovy programming language to manage your server using events, change recipes, add loot tables, customise your world generation, add new blocks and items, or use custom integration with other mods for even more advanced features!
Scripts live in the kubegroovy/ game directory:
startup_scripts/ - loaded once during game startup (.groovy files, support // priority: N, // requires: <modid> headers)
server_scripts/ - reloaded with /reload
client_scripts/ - reloaded with F3+T
Events are posted to Groovy closures, e.g.:
KubeGroovy script bindings use a $ prefix, so imported classes keep their
unprefixed names.
$ServerEvents.recipes { event ->
event.shaped('minecraft:diamond', ['AAA', 'AAA', 'AAA'], [A: 'minecraft:dirt'])
}
Issues and Feedback
If you think you've found a bug with the mod or want to ask for a new feature, feel free to open an issue here on GitHub!
License
KubeGroovy is distributed under the GNU Lesser General Public License v3.0, or LGPLv3. See our LICENSE file for more information. Upstream KubeJS is also LGPLv3, see the original repository for details.
Creating addons (WIP)
Contributing to KubeGroovy
Getting Started
If you want to contribute to KubeGroovy, clone the repository using Git and import the gradle project using an IDE of your choice!
Building
Building KubeGroovy from source should be rather straightforward, just run gradlew build in the root project, and the jar files should be in build/libs directory.
评论 0
登录后参与评分
还没有评论,来抢沙发吧