#Adding a recipe.

41 messages · Page 1 of 1 (latest)

shell oyster
#

I'm not sure what I'm doing wrong but I am trying to combine copper and nickel in an Immersive Engineering arc furnace to get osmium. I am attempting to do a custom recipe because the Immersive Engineering support mod has not updated to 1.20.1. Any suggestions?

ServerEvents.recipes(event =>{
    event.custom({
        type:'immersiveengineeringArcFurnace',
        Ingredients: [
            Ingredient.of('immersiveengineering:ingot_nickel').toJson(),
            Ingredient.of('minecraft:copper_ingot').toJson()
        ],
        results: [
            Item.of('mekanism:ingot_osmium').toResultJson()
        ],
})})
steep hullBOT
#

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

restive steepleBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
#

Here's a list of some of the most common KubeJS errors and their fixes (WIP):

ruby pond
#

oops

mellow jewel
#

the recipe type isn't what you set it to

restive steepleBOT
#

You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or below it will be called server.txt.
Please send it if asked, as it contains helpful information.

mellow jewel
#

it should be immersiveengineering:arc_furnace (iirc?) and not immersiveengineeringArcFurnace

ruby pond
#

Thats right

mellow jewel
ruby pond
#

I figured I'd post the codeblock and stuff so they learn

#

I like the =>{

mellow jewel
shell oyster
#

ServerEvents.recipes(event => {
event.custom({
type:'immersiveengineering:arc_furnace',
Ingredients: [
Ingredient.of('immersiveengineering:ingot_nickel').toJson(),
Ingredient.of('minecraft:copper_ingot').toJson()
],
results: [
Item.of('mekanism:ingot_osmium').toResultJson()
],
})})

#

This is updated but I'm still doing something wrong here.

restive steepleBOT
shell oyster
#
        event.custom({
            type: 'immersiveengineering:arc_furnace',
            ingredients: [
                Ingredient.of('immersiveengineering:ingot_nickel').toJson(),
                Ingredient.of('minecraft:copper_ingot').toJson()
            ],
            results: [
                Item.of('mekanism:ingot_osmium').toResultJson()
            ],
    })})```
#
ServerEvents.recipes(event => {
        event.custom({
            type: 'immersiveengineering:arc_furnace',
            ingredients: [
                Ingredient.of('immersiveengineering:ingot_nickel').toJson(),
                Ingredient.of('minecraft:copper_ingot').toJson()
            ],
            results: [
                Item.of('mekanism:ingot_osmium').toResultJson()
            ],
    })})```js
#

thank you for teaching me how to post the script on here!

gleaming spade
#

Whats the .toJson() doin?

restive steepleBOT
#

Here's a list of some of the most common KubeJS errors and their fixes (WIP):

gleaming spade
#

Nope, ignore the above

restive steepleBOT
#

You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or below it will be called server.txt.
Please send it if asked, as it contains helpful information.

proud fox
#

oh I see the issue

#

its how the parsing needs to work

proud fox
#

should work

#

if that's the correct syntax

#

wait a second

#

the syntax is completely wrong

#

what are you doing?

#
ServerEvents.recipes(event => {
  event.custom({
    type: "immersiveengineering:arc_furnace",
    additives: [
      {
        tag: "forge:ingots/nickel"
      }
    ],
    energy: 51200,
    input: {
      tag: "forge:ingots/copper"
    },
    results: [
      {
        tag: 'mekanism:ingot_osmium'
        count: 1
      }
    ],
    time: 100
  })
})
#

^ This should work

gleaming spade
#

didn't even think to confirm the json

proud fox
#

the syntax was completely wrong xD

#

plus idk why they are trying to use stuff like toJson

#

they can just add the strings directly

#

they aren't trying to dynamically add anything

#

plus as an added bonus I used tags so it'll work better

shell oyster
#

Thank you! Now I've learned how to access the mods Json directly. That's huge!