KubeJS Create
kubejs-create · 2072279 загрузок · LGPL-3.0-only
клиент: required · сервер: required (заявлено автором мода)
KubeJS Создать интеграцию
Описание
Создайте интеграцию для KubeJS. Этот мод позволяет добавлять и правильно редактировать рецепты создания мода в скриптах KubeJS. Все поддерживаемые типы рецептов и примеры приведены ниже. Дополнительную информацию см. на странице «Рецепты](https://mods.latvian.dev/books/kubejs/page/recipeeventjs)».
Поддерживаемые типы рецептов:
createCrushingcreateCuttingcreateMillingcreateBasincreateMixing(поддерживает .heated() и .superheated())createCompacting(поддерживает .heated() и .superheated())createPressingcreateSandpaperPolishingcreateSplashing(объемная стирка)createDeployingcreateFillingcreateEmptying
Примечание: Массовое копчение = ванильное копчение и Массовая обработка = типы рецептов ванильного обдува.
event.recipes.createCrushing(output[], input[])
Выходные данные не обязательно должны быть массивом. Это могут быть как предметы, так и жидкости.
Входные данные не обязательно должны быть массивом. Это могут быть либо ингредиенты, либо Fluid.of('minecraft:water', 1000) или {fluidTag: 'some:fluid_tag', amount: 1000}.
createMechanicalCrafting
event.recipes.createMechanicalCrafting(output, pattern[], {patternKey: input})
Этот тип рецепта аналогичен обычному рецепту в форме верстака.
event.recipes.createSequencedAssembly(output[], input, sequence[])
// output[] are your output items
// input is your input item
// sequence[] is an array of sequences. These sequences are "regular" recipes that are supported.
Примеры
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, вы должны зарегистрировать его в событии запуска:
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')...
Обратите внимание! Рецепты таинственного преобразования предназначены только для клиентской стороны, поэтому единственный способ добавить их в настоящее время — использовать отражение с этим кодом в клиентских сценариях (вне любого события):
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'))
Версии (24)
| Версия | Minecraft | Загрузчики | Файл |
|---|---|---|---|
2001.3.0-build.8+forge |
1.20.1 | forge | скачать |
1802.2.4-build.23+fabric |
1.18.2 | fabric | скачать |
1902.2.4-build.46+fabric |
1.19.2 | fabric | скачать |
1802.2.4-build.16+forge |
1.18.2 | forge | скачать |
1902.2.4-build.44+fabric |
1.19.2 | fabric | скачать |
1902.2.4-build.36+forge |
1.19.2 | forge | скачать |
1802.2.4-build.21+fabric |
1.18.2 | fabric | скачать |
1902.2.4-build.37 |
1.19.2 | fabric | скачать |
1902.2.4-build.34 |
1.19.2 | fabric | скачать |
1902.2.4-build.32 |
1.19.2 | fabric | скачать |
1902.2.4-build.30 |
1.19.2 | fabric | скачать |
1902.2.4-build.26 |
1.19.2 | fabric | скачать |
1902.2.4-build.24 |
1.19.2 | fabric | скачать |
1902.2.4-build.21 |
1.19.2 | fabric | скачать |
1902.2.4-build.18 |
1.19.2 | forge | скачать |
1902.2.4-build.16 |
1.19.2 | forge | скачать |
1902.2.4-build.19 |
1.19.2 | fabric | скачать |
1605.1.4-build.12 |
1.16.5 | forge | скачать |
1605.1.2-build.7 |
1.16.5 | forge | скачать |
1605.1.2-build.4 |
1.16.5 | forge | скачать |
1605.1.2-build.3 |
1.16.5 | forge | скачать |
1605.1.2-build.2 |
1.16.5 | forge | скачать |
1604.1.0.4 |
1.16.2, 1.16.3, 1.16.4, 1.16.5 | forge | скачать |
1604.1.0.3 |
1.16.2, 1.16.3, 1.16.4 | forge | скачать |

