#Making multiple similar recipes at once

93 messages · Page 1 of 1 (latest)

warm socket
#

I want to make a recipe for every ingot with a hot variant to turn it into it's normal variant, how do i do this? Preferably without having to make every recipe individually.
thinking either if there's a way to take all items with 'modularmaterials:ingot_hot.' and take the id after the 'hot.' and put it in after 'modularmaterials:ingot.' or if i can make a list of every material with a hot ingot and normal ingot and execute the recipe for every material. The first one is way better though, since i'll want to make recipes for other material types too and if that works i can just copy-paste it for every material

onEvent('recipes', event => {
 event.recipes.thermal.chiller('modularmaterials:ingot.*', 'modularmaterials:ingot_hot.*')
})
celest isleBOT
#

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

ashen owl
#

something like this, but you'd have to modify it to have the correct IDs

onEvent('recipes', event => {
  let metals = ['iron', 'copper', 'tin']
  metals.forEach(metal => event.recipes.thermal.chiller(`modularmaterials:ingot_${metal}`, `modularmaterials:ingot_hot_${metal}`))
})
warm socket
#

Can kubejs take the id directly from the game instead of taking it from a list?

supple rivet
#

Well

ashen owl
#

you can do something like

let metals = Ingredient.of(/^modularmaterials:ingot_.*/).itemIds
#

which will get you a list of all the IDs that fit that regex

supple rivet
#

Or You could read them from a tag

#

Since a tag is a list

warm socket
#

so then i'll just need to convert the item ids so i can have the material for both of the items in the recipe

ashen owl
#

yeah you could split() it or something

warm socket
#

sorry i know 0 json

#

how would that work?

ashen owl
#

its not json

#

sec

warm socket
#

js*

ashen owl
#

you could actually try this and see what it does

#
onEvent('recipes', event => {
  let metals = Ingredient.of(/^modularmaterials:ingot_.*/).itemIds.map(id => id.replace('modularmaterials:ingot_', ''))
  metals.forEach(metal => event.recipes.thermal.chiller(`modularmaterials:ingot_${metal}`, `modularmaterials:ingot_hot_${metal}`))
})
warm socket
#

Got this error 499 times ```js[ERROR] server_scripts:cooling.js:12: Failed to create recipe for type 'thermal:chiller': Custom recipe has to use a single json object argument!

ashen owl
#

do a console.log(metals) and see what shows up in the logs

#

after let metals..

#

do you have the thermal addon?

warm socket
#

i forgot

#

i'll rerun it

midnight swanBOT
#

Paste version of message.txt from @warm socket

warm socket
#

The first few materials are correct, the others are double/triple ingots that don't exist in a hot form

ashen owl
#

ah it added the hot thing

#

wait

#
onEvent('recipes', event => {
  let metals = Ingredient.of(/^modularmaterials:ingot_hot\..*/).itemIds.map(id => id.replace('modularmaterials:ingot_hot.', ''))
  metals.forEach(metal => event.recipes.thermal.chiller(`modularmaterials:ingot_${metal}`, `modularmaterials:ingot_hot_${metal}`))
})
#

try that

warm socket
#

i had to change the last underscore to a dot but it isn't giving any errors anymore

#

Though nothing shows up in jei

#

Just a bunch of empty recipes

ashen owl
#

can you send me the log again

warm socket
midnight swanBOT
#

Paste version of server.txt from @warm socket

ashen owl
#

are these IDs correct, like modularmaterials:ingot.thulium?

#

with a dot

warm socket
#

Yes

ashen owl
#

who the fuck..

#

well the log says the recipes are added

#

what happens when you check the recipes for something like modularmaterials:ingot.scandium

warm socket
#

I cant press r or u on them

#

and in the blast chillers recipe tab it has a bunch of recipes with no input or output

ashen owl
#

can you show me

warm socket
ashen owl
#

what in fucks name

#

lol

#

um

#

that is a first

#

what happens when you hover over the output?

warm socket
#

completly empty

#

No text at all

ashen owl
#

no tooltip at all

#

what the fuck

warm socket
#

The recipes still work though

ashen owl
#

oh

warm socket
#

They just dont show in jei

ashen owl
#

then its a jei issue

#

try restarting the game

#

jei is buggy af bcePensiveThink

warm socket
#

Nothing changed from a restart

#

Though i'm using a beta version of jei to work with another mod

#

I'll switch it back and try

#

It doesn't even work with the release version

#

what

ashen owl
#

ye im not sure whats going on there

#

thats beyond my knowledge unfortunately lol

warm socket
#

i guess i'll try rei instead

#

Ty for the help

ashen owl
#

hope you get it working, if you do let me know how you fixed it badaThink

warm socket
#

REI doesn't even have a category for blast chilling

#

so confused

ashen owl
#

i wonder if its a thermal issue then

#

O.o

warm socket
#

I'll go ask in the discord

warm socket
#

apparently not

#

I'll just put the recipe in some quest description in the meantime

ashen owl
#

O.o

#

thats so odd

warm socket
#

Probably some other mod causing it

#

Could it be kubejs thermal?

ashen owl
#

never seen it do this, and nobody reported this issue before

#

not to my knowledge at least

ashen owl
# warm socket

@nimble hamlet do you know anything about this by any chance? recipe exists but JEI is freaking the fuck out about it

nimble hamlet
#

update jei

#

and thermal

#

also double check the log, that you actually entered a valid fluid

warm socket
#

JEI and thermal are both up to date on stable release

#

but i didn't put a liquid in

#

the recipe works without it