Machine Recipe API

    • Official Post

    I don't know how possible this will be, but it doesn't sound that complicated:


    Right now, if 2 things add the same recipe to an IC2 machine (the macerator is notorious for this), Minecraft will crash with a rather unhelpful java.lang.RuntimeException: ambiguous recipe error. Just Googling for it shows it's not a rare thing to occure: [google]ic2 ambiguous recipe error[/google]. The only information that the error returns is the recipe that is duplicated, without even directly specifying which mod is adding either of them. Whether it is possible to log which mods add which recipes without impacting load times I guess might help this somewhat, but most of the time the crash returns the stack trace of the 2nd mod adding the recipe, so you can at least complain to that particular dev if necessary. The main issue with this system is that surely if the recipe already exists, rather than crashing and getting all upset (but without actually blaming any mod, or a more helpful suggestion like Greg might do explaining what is happening and why it's not an IC2's fault), why doesn't it just skip over adding the recipe a second time and putting a fatal entry in the log that x mod tried to add a recipe that has already been added by another mod?


    If the only change is to improve the crash message, can the pretty similar ambiguous recipe error for when an item has been added to be processed twice but with different outputs be improved too please? :)

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • When i got duplicated recipes in machines i usually change the ''recipe'' example, a macerator with cobblestone giving stone dust and sand, and that crash, i make a new object for the recipe
    Example


    cobble+ cobble = cobble chunk --->into a macerator----> stone dust


    cobble----->into a macerator---->sand


    i actually didn't make that exactly recipe, but i did it for the iron dust piles and such objets

    If you think i write bad, you're wrong, i just speak in HAYO

    • Official Post

    That doesn't help when one mod blindly adds support for IC2 that conflicts with another that does the same. Neither does it help people who don't recognise what the crash means, I'm sure other mod authors would at least appreciate slightly more intelligent bug reports than crash with IC2 fix plz.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

    • Official Post

    There is a config option in the config file to skip these duplicate recipes.

    This one?

    Code
    ; Ignore invalid recipes.
    ignoreInvalidRecipes = false

    I didn't realise it counted duplicate recipes as invalid, I thought it only skipped the ones using invalid items.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • So the config makes minecraft ignore the invalid recipes, now you can find out what recipe it is, by looking on the craftingtable recipes so the recipes can be replaced

    If you think i write bad, you're wrong, i just speak in HAYO