After @crystal aurora really helped me out with recipe schemas (Here: <#1248442080150425701 message>) so I could grab the digesting recipes and their inputs/outputs for scripts, I wanted to make a create mixing recipe to use the same inputs and outputs.
I got so far as this:
ServerEvents.recipes((event) => {
event.forEachRecipe({ type: "biomancy:decomposing" }, (recipe) => {
//debugRecipe(recipe);
});
event.forEachRecipe({ type: "biomancy:digesting" }, (recipe) => {
//debugRecipe(recipe);
let tempIngredients = [{ fluid: "biomancy:acid", amount: 500 }];
for (let i = 0; i < recipe.get("nutrientsCost"); i++) {
tempIngredients.push({ item: "biomancy:nutrients" });
}
tempIngredients.push(recipe.get("ingredient"));
let tempResults = [{ fluid: "biomancy:acid", amount: 490 }];
console.log(recipe.get("result"));
tempResults.push(recipe.get("result"));
event
.custom({
type: "create:mixing",
ingredients: tempIngredients,
results: tempResults,
})
.id("bleed4me:create_mixing_" + recipe.getId().split(":")[1]);
});
});
but the output of the recipe from Biomancy isn't showing up in JEI, for example here with digesting bamboo, I'm expecting 1 nutrient paste as output. Or for digesting dripleaf, four nutrient past as output. But both just have empty spaces.
The console.log() has given me this in server.log:
...
[20:20:30] [INFO] recipes/automation_era/create_digesting.js#16: '6x biomancy:nutrient_paste' [dev.latvian.mods.kubejs.item.OutputItem]
[20:20:30] [INFO] recipes/automation_era/create_digesting.js#16: '4x biomancy:nutrient_paste' [dev.latvian.mods.kubejs.item.OutputItem]
...
so how do I turn a variable holding for example 4x biomancy:nutrient_paste into {item:"biomancy:nutrient_paste",count:4}?
I feel like the answer is obvious and I'm just a dummy, but I can't think of it.