📄
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.5 KubeJS Termal

上一页12.4 KubeJS UI下一页12.7 便捷战利品表修改(LootJS Forge)

这有帮助吗?


(本节内容参考了)

你可以使用CTRL + F 键快捷搜索本页内容。

onEvent('recipes', event => {
    // 红石炉
    // 将四个煤变为煤炭。
    event.recipes.thermal.furnace('minecraft:diamond', '4x minecraft:coal');
    // 将干海带制为皮革,需要大量能量。
    event.recipes.thermal.furnace('minecraft:leather', 'minecraft:dried_kelp').energy(20000);
    
    // 锯木机
    // 输入一个橡木原木,5%概率输出苹果,10%概率输出树苗。
    event.recipes.thermal.sawmill([Item.of('minecraft:apple').withChance(0.05), Item.of('minecraft:oak_sapling').withChance(0.1)], 'minecraft:oak_leaves')
    // 金合欢台阶合成四个按钮
    event.recipes.thermal.sawmill('4x minecraft:acacia_button', 'minecraft:acacia_slab')
    
    // 磨粉机
    // 将任何树叶方块转换为四根木棍并有50%概率获得五根,需要少量能量。
    event.recipes.thermal.pulverizer(Item.of('minecraft:stick').withChance(4.5), '#minecraft:leaves').energy(100)
    // 将燧石转换为铁粒并有10%概率获得两个。
    event.recipes.thermal.pulverizer(Item.of('minecraft:iron_nugget').withChance(1.1), 'minecraft:flint')
    
    // 感应炉
    // 将煤炭块转换为四个钻石并有50%概率获得五个。
    event.recipes.thermal.smelter(['4x minecraft:diamond', Item.of('minecraft:diamond').withChance(0.5)], 'minecraft:coal_block')
    // 将铁锭和铜锭转换为金锭,需要10,000 FE。
    event.recipes.thermal.smelter('minecraft:gold_ingot', ['minecraft:iron_ingot', 'minecraft:copper_ingot']).energy(10000)
    
    // 离心机
    // 将树苗转换为木棍(50%概率)和300mb水(100%概率)。
    event.recipes.thermal.centrifuge([Item.of('minecraft:stick').withChance(0.5), Fluid.of('minecraft:water', 300)], '#minecraft:saplings')
    // 将两个甜浆果转换为红色染料。
    event.recipes.thermal.centrifuge('minecraft:red_dye', '2x minecraft:sweet_berries')
    
    // 多驱冲压机
    // 将7个骨粉转换为骨头。
    event.recipes.thermal.press('minecraft:bone', '7x minecraft:bone_meal')
    // 使用铁粉和硬币模具合成铁粒,注意配方中模具物品必须具有thermal:crafting/dies标签!
    event.recipes.thermal.press('minecraft:iron_nugget', ['#forge:dusts/iron', 'thermal:press_coin_die'])
  
    // 熔岩炉
    // 将树苗转换为400mb水。
    event.recipes.thermal.crucible(Fluid.of('minecraft:water', 400), '#minecraft:saplings').energy(100)
    // 将矿石转换为500mb岩浆。
    event.recipes.thermal.crucible(Fluid.of('minecraft:lava', 500), '#forge:ores')
    
    // 急速冷冻机
    // 将普通箭转换为迟缓之箭。
    event.recipes.thermal.chiller(Item.of('minecraft:tipped_arrow', '{Potion:"minecraft:slowness"}'), [Fluid.of('minecraft:water', 100), 'minecraft:arrow'])
    // 使用球形铸模将岩浆转换为生铁,注意配方中铸模物品必须具有thermal:crafting/casts标签!
    event.recipes.thermal.chiller('minecraft:raw_iron', [Fluid.of('minecraft:lava', 1000), 'thermal:chiller_ball_cast'])
    
    // 流体精炼机
    // 将杂酚油转换为树油和乳胶,概率获得橡胶。
    event.recipes.thermal.refinery([Item.of('thermal:rubber').withChance(0.8), Fluid.of('thermal:tree_oil', 100), Fluid.of('thermal:latex', 50)], Fluid.of('thermal:creosote', 200))
    // 将书油转换为少量精炼油,需要大量能量。
    event.recipes.thermal.refinery(Fluid.of('thermal:refined_fuel', 50), Fluid.of('thermal:tree_oil', 100)).energy(20000)
    // Unbrew an awkward potion. This uses the cofh core potion fluid with some nbt.
    event.recipes.thermal.refinery([Fluid.of('minecraft:water', 1000), 'minecraft:nether_wart'], Fluid.of('cofh_core:potion', 1000, '{Potion:"minecraft:awkward"}'))
    
    // 药水酿造机
    // 将红石粉和200mb岩浆转换为不稳定熔融红石。
    event.recipes.thermal.brewer(Fluid.of('thermal:redstone', 200), [Fluid.of('minecraft:lava', 200), 'minecraft:redstone'])
    // 使用64个基岩和粗制的药水酿造无法合成的药水(无nbt)。
    event.recipes.thermal.brewer(Fluid.of('cofh_core:potion', 1000), [Fluid.of('cofh_core:potion', 1000, '{Potion:"minecraft:awkward"}'), '64x minecraft:bedrock'])
    
    // 流体灌装机
    // 为海绵注水。
    event.recipes.thermal.bottler('minecraft:wet_sponge', [Fluid.of('minecraft:water', 10000), 'minecraft:sponge'])
    // 将齿轮和不稳定熔融红石转换为机器框架。
    event.recipes.thermal.bottler('thermal:machine_frame', ['#forge:gears', Fluid.of('thermal:redstone', 500)]).energy(500)
})
KubeJS Thermal 官方Wiki