#Thermal Press recipe Won't Convert

1 messages · Page 1 of 1 (latest)

solemn sandal
#

Code:

e.forEachRecipe({ type: 'thermal:press', input: '#forge:ingots', output: '#forge:plates' }, r => {
      let ingredients = r.originalRecipeIngredients
      let output = r.originalRecipeResult
      e.recipes.create.pressing(output, ingredients[0])
    })

Thermal Recipe Example:

{
  "type": "thermal:press",
  "ingredient": {
    "tag": "forge:ingots/nickel"
  },
  "result": [
    {
      "item": "thermal:nickel_plate"
    }
  ]
}

For some reason, the thermal series press recipes won't let me convert them to other recipes. And I mean, flat out won't create the recipe. I've tested the above code with stuff like #minecraft:planks for input, and #minecraft:slabs for output, and its worked fine, but oddly not with this. Maybe it could be because the input is a tag?

regal vergeBOT
#

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

lofty marlin
#

do you have the kjs thermal add-on installed?

#

if not then kubejs won't know how to parse the recipe and r.originalblahblah will not be populated with any useful information

night etherBOT
#

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.

solemn sandal
#

yes, i have the addon installed, but i believe i'm reading from the direct json and not actually the thermaljs mod.

night etherBOT
#

Paste version of message.txt from @solemn sandal

lofty marlin
#

since the recipes are compatible you could just pull the json and pass it along

ServerEvents.recipes(event => {
    event.forEachRecipe({ type: 'thermal:press', input: '#forge:ingots', output: '#forge:plates' }, recipe => {
        let output = recipe.json.get('result')
        let ingredients = recipe.json.get('ingredient')
        event.recipes.create.pressing(output, ingredients)
    })
})
solemn sandal
#

Ohhhh k thanks will try when i get home

solemn sandal
#

it worked, thanks