#Trying to resolve an error in KubeJS-Create - Making recipes

26 messages · Page 1 of 1 (latest)

meager grove
#

Hi, I'm starting to try to assemble my own custom changes to this modpack I'm making(And I am a blind man stumbling in the dark for the most part trying to understand this stuff, admittedly).

I've been trying to figure out why this setup isn't working to create a couple basic recipes. I'm sure I'm missing something simple, though, I just can't figure it out.

My code is thus

    event.server.runCommandSilent('reload')
  })
  
ServerEvents.recipes(event => {


    // Generating Basic Resources Renewably


    event.recipes.createMilling(output[minecraft:coarse_dirt], input[#minecraft:logs])
    event.recipes.createSplashing(output[minecraft:dirt], input[#minecraft:coarse_dirt])



})```

And I keep recieving the error in the following log.
brazen gustBOT
#

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

meager grove
sand furnaceBOT
#

Paste version of server.log from @meager grove

meager grove
#

Any assistance is appreciated. I've just been staring at this for an hour and can't suss out why it doesn't work haha

reef hearth
#

I believe it is event.recipes.create.milling, not event.recipes.createMilling

#

Same deal with splashing

meager grove
#

Ah, lemme try that. The examples on the modpage showed it as I have it

#

Same error

reef hearth
meager grove
#

"missing ] in index expression"

reef hearth
#

Oh, Idk why I didn't notice

#
    event.recipes.createMilling(output[minecraft:coarse_dirt], input[#minecraft:logs])
    event.recipes.createSplashing(output[minecraft:dirt], input[#minecraft:coarse_dirt])
```Why do you have input[] and whatnot? Should be:
```js
    event.recipes.createMilling(["minecraft:coarse_dirt"], ["#minecraft:logs"])
    event.recipes.createSplashing(["minecraft:dirt"], ["#minecraft:coarse_dirt"])
meager grove
#

I was following along with an example from the modpage

#

Lemme try this

#

Aha

#

fixed

reef hearth
#

It's showing you how it works. For example, output[] is showing that output is an array of strings

#

It's just how they document it

meager grove
#

Ah, so it implicitly understands that "the first category is output, the second category is the input"?

reef hearth
#

Yeah

meager grove
#

That makes sense

#

And is easy to work with now that I understand that lmao

reef hearth
#

Yus

meager grove
#

I appreciate it. Approaching all of this stuff from the perspective of a caveman with a sledgehammer, so it's been a learning process

#

I'll mark this closed 🙂