Hi. I have scoured the discord and found several tickets in relation to this, unfortunately through the past couple of hours and many revisions I still have not found a solution.
If someone could maybe help point me in the right direction it would be greatly appreciated. I followed the section here
https://wiki.latvian.dev/books/kubejs-legacy/page/recipeeventjs
in relation to the event.custom
ServerEvents.recipes(e => {
const ensDust = `exnihilosequentia:dust`
const ensRack = `exnihilosequentia:crushed_netherrack`
const ensEnd = `exnihilosequentia:crushed_end_stone`
const compCobble = `compressium:cobblestone_1`
const compGravel = `compressium:gravel_1`
const compSand = `compressium:sand_1`
const compNethRack = `compressium:netherrack_1`
const compEndSt = `compressium:endstone_1`
//THIS IS BREAKING AT toResultJson
function hammer(input, result) {
e.custom({
type: `exnihilosequentia:hammer`,
ingredients: Ingredient.of(input).toJson(),
results: [Item.of(result).toResultJson()]
})
}
function counthammer(input, output, count) {
e.custom({
type: `exnihilosequentia:hammer`,
input: Ingredient.of(input).toJson(),
results: [Item.of(output).withCount(count).toResultJson()]
})
}
hammer(compCobble, compGravel)
hammer(compGravel, compSand)
counthammer(compSand, ensDust, 9)
counthammer(compNethRack, ensRack, 9)
counthammer(compEndSt, ensEnd, 9)
})
again any help would be greatly appreciated. Thank you!
Examples
The most basic script to add a single recipe:
onEvent('recipes', event => {
event.shap...