#recipe on kubejs
66 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
What mod is this?
Modern Industrialization
O geez. Gimmie a minute lemme find an example
You can add, remove, and modify recipes with KubeJS. The wiki has a page on that!
If you want to learn how to add recipes to any mod, click the Custom button.
Check this out too

this craft is being done in assembler
StartupEvents.recipes(event =>{
event.custom({
type: 'modern_industrialization:assembler'
duration: 200, //Ticks
eu: 8,
item_inputs:[
Item.of('modid:someitem)]
item_outputs:[
Item.of('modid:someitem)]
})
})```
Try that
But with your set items
boy that indentation
okay Thank you
Sorryyy not doing this in an IDE
you can probably just use Item.of()
instead of writing the object
StartupEvents.recipes(event => {
event.custom({
type: 'modern_industrialization:assembler',
duration: 200,
eu: 8,
item_inputs: [Item.of('16x carrot').toJson()],
item_outputs: [Item.of('32x dirt').toJson()]
})
})
something like that
How'd you get it to look like JS? It's so pretty
You can write your code in a codeblock by typing it between the codeblock delimiters:
```js
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
```
As an example, :arrow_up: will look like this:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
You can write your code in a codeblock by typing it between the codeblock delimiters:
```js :arrow_left:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
As an example, :arrow_up: will look like this:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
Interesting!
i think i did something wrong
can i see your full script
apparently youre missing brackets
which leads me to believe youre not using an IDE 
You can write your code in a codeblock by typing it between the codeblock delimiters:
```js :arrow_left:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
As an example, :arrow_up: will look like this:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
StartupEvents.recipes(event => {
event.custom({
type: 'modern_industrialization:assembler',
duration: 200,
eu: 8,
item_inputs: [Item.of('ad_astra:rocket_nose_cone').toJson()],
item_inputs: [Item.of('4x ad_astra:rocket_fin').toJson()],
item_outputs: [Item.of('ad_astra:tier_1_rocket')()]
})
})
stop spamming the bot command lol
sorry
you have inputs twice
amd sp,e weord brackets
some
ServerEvents.recipes(event => {
event.custom({
type: 'modern_industrialization:assembler',
duration: 200,
eu: 8,
item_inputs: [
Item.of('ad_astra:rocket_nose_cone').toJson(),
Item.of('4x ad_astra:rocket_fin').toJson()
],
item_outputs: [Item.of('ad_astra:tier_1_rocket').toJson()]
})
})
unknown event
huh?
ServerEvents
?
the first line is ServerEvents.recipes(event => { not StartupEvents
Don't know
Fluid.of('fluid ID', amount)
for instance Fluid.of('minecraft:lava', 1000)
This comand does not want to work with assembler
command?
ServerEvents.recipes(event => {
event.custom({
type: 'modern_industrialization:assembler',
duration: 20000,
eu: 10,
item_inputs: [
Item.of('ad_astra:rocket_nose_cone').toJson(),
Item.of('4x ad_astra:rocket_fin').toJson(),
Item.of('3x ad_astra:steel_engine').toJson(),
Item.of('46x modern_industrialization:steel_large_plate').toJson(),
Item.of('10x ad_astra:steel_tank').toJson(),
Item.of('16x ae2:quartz_glass').toJson(),
Item.of('6x modern_industrialization:electronic_circuit').toJson(),
Fluid.of('ad_astra:oil', 1000)
item_outputs: [Item.of('ad_astra:tier_1_rocket').toJson()]
})
})
the Duration is in ticks, so currently your recipe will take 1000 seconds to complete.
also, you're missing the end of item_inputs
and use codeblocks when pasting code, please.
ServerEvents.recipes(event => {
event.custom({
type: 'modern_industrialization:assembler',
duration: 200,
eu: 10,
item_inputs: [
Item.of('ad_astra:rocket_nose_cone').toJson(),
Item.of('4x ad_astra:rocket_fin').toJson(),
Item.of('3x ad_astra:steel_engine').toJson(),
Item.of('46x modern_industrialization:steel_large_plate').toJson(),
Item.of('10x ad_astra:steel_tank').toJson(),
Item.of('16x ae2:quartz_glass').toJson(),
Item.of('6x modern_industrialization:electronic_circuit').toJson(),
Fluid.of('ad_astra:oil', 1000)
],
item_outputs: [Item.of('ad_astra:tier_1_rocket').toJson()]
})
})```
Try that
Please send your server.txt log file.
You can find it here: minecraft/logs/kubejs/server.txt
again, no screenshots please
Paste version of server.txt from @flat ridge
How are you @inland lark
