#Custom recipe using custom event

29 messages · Page 1 of 1 (latest)

scarlet sandal
#

So i attempted to create a custom recipe for create since kubejs create doesnt exist for fabric 1.20.1 and im running into issues

ServerEvents.recipes(event => {
    event.custom([
        type: 'create:mixing',
              ingredients: [
                { item: 'minecraft:cobblestone' },
                { item: 'minecraft:gold_nugget' },
                { fluid: 'minecraft:lava', amount: 100 }
              ],
              results: [
                { item: 'create:ochrum' }
              ]
          'heatRequirement': 'heated'
    ])
}

here's the server log

edgy jungleBOT
#

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

surreal barn
#

you forgot a comma

#

do you use an actual code editor?

#

??editor

shell summitBOT
# surreal barn ??editor

If you're working with KubeJS scripts, config files, or similar things, we generally recommend using an actual IDE rather than just Notepad++ and its various siblings.
In a lot of cases, it can help you find errors in your code faster and also gives you neat features like syntax highlighting, automatic formatting, etc!
We recommend Visual Studio Code, since it's lightweight(-ish) and works very well with JavaScript files out-of-the-box.

scarlet sandal
#

i should download one

surreal barn
scarlet sandal
#

vsc is probably good isnt it

surreal barn
#
ServerEvents.recipes(event => {
    event.custom({
        type: 'create:mixing',
        ingredients: [
            { item: 'cobblestone' },
            { item: 'gold_nugget' },
            { fluid: 'lava', amount: 100 }
        ],
        results: [{ item: 'create:ochrum' }],
        heatRequirement: 'heated'
    })
})
surreal barn
scarlet sandal
#

lol i started yesterday and im completely new to JS

#

my only experience is java

surreal barn
#

nw

#

everyone learns heh

scarlet sandal
#

it feels similar but i can see a lot of big differences lol

surreal barn
#

js vs java aren't very similar tbf

#

ts vs java? maybe

scarlet sandal
#

oh what thats supposed to be 100

surreal barn
#

you're on fabric

#

fluids on fabric are different

#

idk where the macro went

#

but you need to multiply the amount by 81

#

so 8100 instead of 100

scarlet sandal
#

ooh okay

#

perfect thank you!

surreal barn
#

np

#

??closeticket

shell summitBOT
# surreal barn ??closeticket

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.