📄
XPlus KubeJS Tutorial v1 (zh_cn)
  • 前言
    • 本文更新日志
  • 一、一切的开始
    • 1.1 常用指令
    • 1.2 文件结构
    • 1.3 脚本基础
    • 1.4 事件列表
  • 二、配方
    • 2.1 新建配方及物品表示
    • 2.2 配方的修改和删除
    • 2.3 非标准配方修改
  • 三、自定义修改初步
    • 3 标签
    • 4 自定义Loot Table
    • 5 自定义流体
    • 6 自定义世界生成
    • 7 添加方块
    • 10:自定义窗口标题和logo
  • 四、事件初步
    • 8 聊天事件
    • 9 计划重启
  • 五、针对其他模组的修改
    • 11.1 JEI信息修改
    • 11.2 REI信息修改
    • 11.3 FTB Quest相关修改
    • 11.4 KubeJs内置游戏阶段 (类似于GameStage)
  • 六、拓展模组简介
    • 12.1 KubeJS Create
    • 12.2 KubeJS Blood Magic
    • 12.3 KubeJS Mekanism
    • 12.4 KubeJS UI
    • 12.5 KubeJS Termal
    • 12.7 便捷战利品表修改(LootJS Forge)
    • 12.8 LootJS战利品表修改实例
  • 七、游戏内容修改进阶
    • 13 自定义物品和物品ToolTip
    • 14 方块和物品属性修改
  • 八、事件进阶
    • 15.0 事件列表
    • 15.1 玩家&实体事件,信息获取及操作
    • 15.2 实体生成 & RayTraceResultJS & ItemStackJS及其他
    • 15.3 方块信息获取及操作
    • 15.4 WorldJS 和 ServerJS
    • 15.5 本章例子
    • 15.6 测试用例
  • 九、杂项
    • 16 网络包和Painter API
    • 17 本地化相关
    • 18.1 熔炼之镐
    • 18.2 罐头示例(包含物品注册, 配方添加, 玩家交互和persistentData的使用)
    • 19 Forge事件监听
  • 十、1.18.2的变化和介绍
    • 20 1.18.2中的变化和功能
    • 20.1 ProbeJS
    • 20.2 组件(Component)的使用
    • 20.3 格式变化
      • 20.3.1 世界生成
      • 20.3.2 方块 / 物品注册
      • 20.3.3 事件
      • 20.3.4 global[] 的使用
    • 20.4 命令注册
    • 20.5 反射与Java access
由 GitBook 提供支持
在本页

这有帮助吗?

在GitHub上编辑
  1. 六、拓展模组简介

12.2 KubeJS Blood Magic


支持的格式:
- 祭坛
event.recipes.bloodmagic.altar(output, input)
event.recipes.bloodmagic.altar(output, input).upgradeLevel(int).altarSyphon(int).consumptionRate(int).drainRate(int)
- 炼金矩阵
event.recipes.bloodmagic.array(output, baseInput, addedInput)
event.recipes.bloodmagic.array(output, baseInput, addedInput).texture(string)
- 狱火熔炉
event.recipes.bloodmagic.soulforge(output, [input])
event.recipes.bloodmagic.soulforge(output, [input]).minimumDrain(double).drain(double)
- 奥术粉灰
event.recipes.bloodmagic.arc(output, input, tool)
event.recipes.bloodmagic.arc(output, input, tool, [addedOutput])
event.recipes.bloodmagic.arc(output, input, tool, [addedOutput]).consumeIngredient(boolean).outputFluid(fluid)
- 炼金术桌
event.recipes.bloodmagic.alchemytable(output, [input])
event.recipes.bloodmagic.alchemytable(output, [input]).syphon(int).ticks(int).upgradeLevel(int)


例:
onEvent('recipes', event => {
  const { altar, array, soulforge, arc, alchemytable } = event.recipes.bloodmagic
  altar('minecraft:carrot', 'minecraft:apple')
  array('minecraft:spruce_planks', 'minecraft:oak_planks', 'minecraft:birch_planks')
  soulforge('minecraft:stone', ['minecraft:gold_ore', 'minecraft:diamond_ore', 'minecraft:iron_ore']).drain(1.0)
  arc('minecraft:netherite_ingot', 'minecraft:iron_ingot', 'minecraft:iron_pickaxe', [Item.of('minecraft:cobblestone').chance(0.4)])
  alchemytable('minecraft:gold_ingot', ['minecraft:iron_ingot', 'minecraft:iron_ingot', 'minecraft:iron_ingot', 'minecraft:iron_ingot']).upgradeLevel(2)
})
上一页12.1 KubeJS Create下一页12.3 KubeJS Mekanism

这有帮助吗?