I'm trying to remove and then create custom recipes for mystical agriculture infusions.
I'm using this function
const infusion = (e, seed, seedId, input, combType, essenceType) => {
e.remove({id: seedId})
const comb = Ingredient.of('productivebees:spawn_egg_configurable_bee', {
EntityTag: {
type: `productivebees:${combType}`
}
})
const essence = Ingredient.of(essenceType)
e.custom({
type: 'mysticalagriculture:infusion',
input: Ingredient.of(input),
ingredients: [
essence,
comb,
essence,
comb,
essence,
comb,
essence,
comb,
],
result: Ingredient.of(seed)
}).id(seedId)
}
but the relevant error is:
[15:19:58] [ERR ] Error occurred while handling event 'recipes': Cannot convert [object Object] to java.lang.Integer (server_scripts:recipes/mystical_agriculture.js#513)
and I've attached the kubejs/server.txt