#Is there a way to make KubeJS not report mod recipe errors?

6 messages · Page 1 of 1 (latest)

amber reef
#

As per the title I am curious if I can disable the errors from mods recipes that have errors and only show errors / warnings for recipes done by KubeJS itself?

wraith swiftBOT
#

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

mild gazelle
#

the warnings (as of my knowledge) has no effect on anything in the game, just there. (i believe)

minor knoll
#

just editing those recipes won't work as there's an actual error in those recipes' .json files
I believe I saw somewhere here in discord that there is a way to suppress them in code, but can't seem to find it now

You can however use a datapack to nuke the recipe, stopping it from being serialized and thus reported due to the aforementioned inherent errors
KubeJS autoloads all .json files inside the kubejs/data folder as datapack overrides

waxen turtleBOT
#

[➤](#1359604711828881681 message)

ServerEvents.generateData("after_mods", event => {
    let brokenrecipes = [
        'tconstruct:recipe/common/materials/steel_ingot_from_block',
        'garnished:recipe/integration/mechanicalextruder/extruding/from_yellow_mastic_resin'
    ]
    
    for (let id of brokenrecipes) {
        event.json(`${id}.json`,
            {
                "neoforge:conditions": [
                    {
                        "type": "neoforge:false"
                    }
                ]
            }
        )
    }
})``` add in all the erroring recipe id's into the array.  You can thank DarkPhan for finding a working way to do this.  it basically nulls out the recipes on generatedata pass, testing myself right now, but works for his pack on 1.21