Skip to content

KubeJS 集成

AnvilCraft 提供了完整的 KubeJS 集成,允许你使用 KubeJS 脚本自定义 AnvilCraft 的配方。

支持的配方类型

基础用法

要使用 AnvilCraft 的 KubeJS 集成,首先需要在 KubeJS 脚本中导入相关类:

js
// 在你的 KubeJS 脚本中
ServerEvents.recipes(event => {
    // 你的配方代码
})

所有 AnvilCraft 配方都遵循 KubeJS 标准配方格式:

js
event.custom({
    type: "anvilcraft:recipe_type",
    // 配方参数
})

Released under the CC-BY-NC-SA 4.0 License.