#Custom recipes failing

41 messages · Page 1 of 1 (latest)

pallid summit
#

Hello, i'm attempting to reduce the cost in iron of various items, vanilla and modded. The first three (Lantern, chain and candle holder) work just fine, but the 15 differently colored candle holders do not work for some reason. And i can't seem to point out my mistake

fluid condorBOT
#

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

pallid summit
fallow pecanBOT
#

Paste version of message.txt from @pallid summit

narrow otter
#

quick tip

#

instead of Item.of('minecraft:lantern', 1) just write 'minecraft:lantern'

fallow pecanBOT
#

Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.

fallow pecanBOT
#

Paste version of server.log from @pallid summit

narrow otter
#

its saying the IDs like supplementaries:red_candle_holder dont exist

pallid summit
#

huh

#

Oh my god the color goes after 😭

narrow otter
#

is it candle_holder_red?

pallid summit
#

yes....

#

That's silly

narrow otter
#

here you go:

#
ServerEvents.recipes(event => {
  event.shaped('minecraft:lantern', [
    ' N ',
    'NTN',
    'NNN'
  ], {
    N: 'minecraft:iron_nugget',
    T: 'minecraft:torch'
  })

  event.shaped('minecraft:chain', ['N', 'N', 'N'], {
    N: 'minecraft:iron_nugget'
  })

  event.shaped('supplementaries:candle_holder', [
    'NCN',
    ' N '
  ], {
    N: 'minecraft:iron_nugget',
    C: 'minecraft:candle'
  })

  colors = ['red', 'orange', 'yellow', 'white', 'pink', 'gray', 'light_gray', 'cyan', 'blue', 'lime', 'green', 'purple', 'magenta', 'black', 'light_blue']

  colors.forEach(color => {
    event.shaped(`supplementaries:candle_holder_${color}`, [
      'NCN',
      ' N '
    ], {
      N: 'minecraft:iron_nugget',
      C: `minecraft:${color}_candle`
    })
  })
})
#

a much shorter script

pallid summit
#

OMG !!

#

thank you

#

i was wondering if something like that was doable

#

this is awesome thank you

narrow otter
pallid summit
narrow otter
#

show me the log again hmmm

pallid summit
#

could it be that {color} should be {colors} ?

narrow otter
#

nono

pallid summit
fallow pecanBOT
#

Paste version of server.log from @pallid summit

narrow otter
#

ah fuck

#

change this

colors = ['red', 'orange', ...

to this

let colors = ['red', 'orange', ...
#

too much python at work

pallid summit
#

oooh i see

#

i'll update you on if it works this time

#

It works !!!!!!

narrow otter