介绍
支持的配方类型:
– createCrushing
– createCutting
– createMilling
– createBasin
– createMixing(支持 .heated() 和 .superheated())
– createCompacting(支持 .heated() 和 .superheated())
– createPressing
– createSandpaperPolishing
– createSplashing(批量洗涤)
– createDeploying
– createFilling
– createEmptying
注意:批量烟熏 = 原版烟熏,批量高炉冶炼 = 原版高炉冶炼配方类型。
event.recipes.createCrushing(output[], input[])
输出不必是数组。可以是物品或流体
输入不必是数组。可以是原料或 Fluid.of(‘minecraft:water’, 1000) 或 {fluidTag: ‘some:fluid_tag’, amount: 1000}
– createMechanicalCrafting
event.recipes.createMechanicalCrafting(output, pattern[], {patternKey: input})
此配方类型与普通工作台有序配方相同
– createSequencedAssembly
event.recipes.createSequencedAssembly(output[], input, sequence[])
// output[] 是你的输出物品
// input 是你的输入物品
// sequence[] 是序列数组。这些序列是受支持的“常规”配方。
示例:
event.recipes.createCrushing([
‘2x minecraft:cobblestone’,
‘minecraft:redstone’,
Item.of(‘minecraft:redstone’).withChance(0.5)
], ‘minecraft:redstone_ore’)
event.recipes.createMixing(‘create:chromatic_compound’, [
‘#forge:dusts/glowstone’,
‘#forge:dusts/glowstone’,
‘#forge:dusts/glowstone’,
‘create:powdered_obsidian’,
‘create:powdered_obsidian’,
‘create:powdered_obsidian’,
‘create:polished_rose_quartz’
]).superheated()
event.recipes.createFilling(‘create:blaze_cake’, [
‘create:blaze_cake_base’,
Fluid.of(‘minecraft:lava’, 250)
])
event.recipes.createEmptying([
‘minecraft:glass_bottle’,
Fluid.of(‘create:honey’, 250)
], ‘minecraft:honey_bottle’)
event.recipes.createMechanicalCrafting(‘minecraft:piston’, [
‘CCCCC’,
‘CPIPC’,
‘CPRPC’
], {
C: ‘#forge:cobblestone’,
P: ‘#minecraft:planks’,
R: ‘#forge:dusts/redstone’,
I: ‘#forge:ingots/iron’
})
event.recipes.createSequencedAssembly([ // start the recipe
Item.of(‘6x create:large_cogwheel’).withChance(32.0), // have this item be an output with a certain chance
Item.of(‘create:brass_ingot’).withChance(2.0), // have this item be an output with a certain chance
‘minecraft:andesite’, // have this item be a guaranteed output
‘create:cogwheel’, // have this item be a guaranteed output
‘minecraft:stick’, // have this item be a guaranteed output
‘minecraft:iron_nugget’ // have this item be a guaranteed output
], ‘create:brass_ingot’, [ // ‘create:brass_ingot’ is the input.
// the transitional item set by “transitionalItem(‘create:incomplete_large_cogwheel’)” is the item that will be used during the recipe as the item that the input is using to transition to the output.
event.recipes.createDeploying(‘create:incomplete_large_cogwheel’, [‘create:incomplete_large_cogwheel’, ‘#minecraft:planks’]), // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
event.recipes.createDeploying(‘create:incomplete_large_cogwheel’, [‘create:incomplete_large_cogwheel’, ‘#minecraft:wooden_buttons’]), // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
event.recipes.createCutting(‘create:incomplete_large_cogwheel’, ‘create:incomplete_large_cogwheel’).processingTime(50) // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
]).transitionalItem(‘create:incomplete_large_cogwheel’).loops(6) // set the transitional item and the loops (amount of repetitions)
如果你想在 sequenced_assembly 配方中使用自定义的过渡物品,必须在 startup 事件中注册它:
onEvent(‘item.registry’, event => {
// Texture for this item goes in kubejs/assets/kubejs/textures/item/my_part.png
event.create(‘my_part’, ‘create:sequenced_assembly’).displayName(‘My Part’)
})
然后使用 …transitionalItem(‘kubejs:my_part’)…
注意!Mysterious Conversion 配方仅在客户端生效,因此目前添加它们的唯一方法是在客户端脚本中(任何事件之外)使用以下代码通过反射实现:
let MysteriousItemConversionCategory = java(‘com.simibubi.create.compat.jei.category.MysteriousItemConversionCategory’)
let ConversionRecipe = java(‘com.simibubi.create.compat.jei.ConversionRecipe’)
MysteriousItemConversionCategory.RECIPES.add(ConversionRecipe.create(‘minecraft:apple’, ‘minecraft:carrot’))
MysteriousItemConversionCategory.RECIPES.add(ConversionRecipe.create(‘minecraft:golden_apple’, ‘minecraft:golden_carrot’))
Lat 的其他作品
查看全部 →Rhino
Mozilla Rhino 库的一个分支,经修改后用于模组中
KubeJS
用JavaScript编辑配方、添加自定义物品、编写世界事件脚本!
Item Filters
Item Filters 是一个前置模组,供 FTB Quests 等模组使用。它添加了多种过滤物品,让你能精确选择要匹配的物品。
KubeJS Mekanism
KubeJS 的通用机械集成


评论
登录后评论和评分