1.18.2 How put kubejs custom items in ingredients
RapidMesck opened this issue ยท 3 comments
Describe the bug
the recipe cannot identify a custom item from kubejs
Screenshots / Scripts / Logs
{
"name": "Elemental Rune",
"type": "mysticalagriculture:resource",
"tier": "mysticalagriculture:2",
"ingredient": {
"tag": "kubejs:elemental_agglomeratio"
},
"color": "fee4ab",
"textures": {
"flower": "mysticalagriculture:block/flower_rock",
"essence": "mysticalagriculture:item/essence_rock"
}
}
Versions (please complete the following information):
- Minecraft: 1.18.2
- Forge: 40.2.0
- Cucumber: Cucumber-1.18.2-5.1.3
- Mystical Agriculture: MysticalAgriculture-1.18.2-5.1.4
- Mystical Customization: MysticalCustomization-1.18.2-3.1.2
I used this solution:
i made a custom recipe using kubejs in infuser altar for seed
exemple code:
let mysticalAltar = (e, output, middleItem, ingredientList) => {
e.custom({
type: 'mysticalagriculture:infusion',
input: { item: middleItem },
ingredients: ingredientList.map(item => (item.charAt(0) === '#') ? { tag: item.substring(1) } : { item: item }),
result: { item: output }
}).id(`kubejs:infusion_altar_crafting/${output.replace(':', '/')}`);
};
onEvent('recipes', event => {
mysticalAltar(event, 'mysticalagriculture:elemental_rune_seeds', 'mysticalagriculture:prosperity_seed_base',['mysticalagriculture:prudentium_essence', 'mysticalagriculture:prudentium_essence', 'mysticalagriculture:prudentium_essence', 'mysticalagriculture:prudentium_essence', 'kubejs:elemental_agglomeratio', 'kubejs:elemental_agglomeratio', 'kubejs:elemental_agglomeratio', 'kubejs:elemental_agglomeratio'])
})
Versions:
Minecraft: 1.18.2
Forge: 40.2.0
Cucumber: Cucumber-1.18.2-5.1.3
Mystical Agriculture: MysticalAgriculture-1.18.2-5.1.4
Mystical Customization: MysticalCustomization-1.18.2-3.1.2
Kubejs: kubejs-forge-1802.5.5-build.569
Did you mean to use a tag in the first example? You seem to be using an item id in the second example.