#recipe on kubejs

66 messages · Page 1 of 1 (latest)

flat ridge
#

I want to make a similar recipe but I don't know how I did it

clever viperBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

sick lark
#

What mod is this?

flat ridge
#

Modern Industrialization

sick lark
#

O geez. Gimmie a minute lemme find an example

glacial tinselBOT
#

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.

sick lark
#

Check this out too

inland lark
flat ridge
#

this craft is being done in assembler

sick lark
#
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

inland lark
#

boy that indentation

flat ridge
#

okay Thank you

sick lark
#

Sorryyy not doing this in an IDE

inland lark
#

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

sick lark
#

How'd you get it to look like JS? It's so pretty

glacial tinselBOT
#

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)
})
inland lark
#

hmm

#

i'll edit that command

glacial tinselBOT
#

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)
})
sick lark
#

Interesting!

flat ridge
inland lark
#

can i see your full script

#

apparently youre missing brackets

#

which leads me to believe youre not using an IDE hmmm

flat ridge
glacial tinselBOT
#

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)
})
inland lark
#

not pics please

#

i cant do anything with pics

flat ridge
#

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')()]
})

})

inland lark
#

stop spamming the bot command lol

flat ridge
#

sorry

inland lark
#

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()]
  })
})
flat ridge
#

unknown event

inland lark
#

huh?

flat ridge
final kiln
#

ServerEvents

flat ridge
#

?

final kiln
#

the first line is ServerEvents.recipes(event => { not StartupEvents

flat ridge
#

now its working

#

how to add liquid to crafting

inland lark
#

how did you even get startup at first

#

o-o

flat ridge
#

Don't know

inland lark
#

for instance Fluid.of('minecraft:lava', 1000)

flat ridge
#

This comand does not want to work with assembler

inland lark
#

command?

flat ridge
#

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()]
})

})

sick lark
#

the Duration is in ticks, so currently your recipe will take 1000 seconds to complete.
also, you're missing the end of item_inputs

inland lark
#

and use codeblocks when pasting code, please.

sick lark
#
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
flat ridge
glacial tinselBOT
#

Please send your server.txt log file.
You can find it here: minecraft/logs/kubejs/server.txt

inland lark
#

again, no screenshots please

flat ridge
glacial tinselBOT
#

Paste version of server.txt from @flat ridge

flat ridge
#

How are you @inland lark