Recipe Stages

Recipe Stages

28M Downloads

[Suggestion] Add a way to remove a recipe's stage.

SuperKael opened this issue ยท 8 comments

commented

I am managing a custom modpack for me and my friends, and it's a rather large modpack. Since I don't have the time or the will to stage every item individually, I am having every item be staged by default, and then utilizing removeItemStage to change, or entirely remove, the stage of the items I explicitly specify. However, no such method exists for RecipeStages, meaning that I can not do this with the recipes. It would be very helpful if there was a way to remove or change the stage of a recipe that has already had a stage set before. (I specify changing too, because it has inconstant behavior. It feels like a race condition - oak and spruce doors might change their recipe's stage correctly, while birch doesn't for no particular reason.)

commented

+1 to "removeItemStage". Also, here's a good reason for adding removal:
I want to add whole ThermalExpansion mod to a stage "TE", yet for the sake of unification, all other mods ingots, plates and ores are removed and/or unified to the TE ones. So I would like to stage TE EXCEPT recipes that include ingots and plates.

For the ItemStages mod I can do mods.ItemStages.removeItemStage( itemUtils.getItemsByRegexUnlocalizedName("*plate") );

For the RecipeStages I am unable to do that because of some made up reasons or just because author is too lazy to implement something like that.

commented

When I said that no other stage mod did it, I was under the impression that no other stage mod did it.

As for being lazy, read this: https://www.dictionary.com/browse/real-life

I have one of those, and don't exactly have all the free time to work on a mod that I make for free, if I was being paid to do this, then sure complain all you want about me being lazy, but I don't get paid to make this mod, if I wanted to work on it, I'm working on it in my own free time, free time that is split between my other 30 mods.

Tl;dr stop being lazy, make a pull request for it if you absolutely need the feature right now.

commented

No.

Just don't add the recipe in the first place, use an array to store the outputs that you dint want staged, then check if the recipe you are staging outputs an item in that array, if if it does, don't stage it.

commented

Ok :(

commented

So github is being stupid and not showing me a comment, but I got an email about it, so it must exist!

so testing would need to be done, but IIRC, there would be 2 hoe recipes, one with stage "one" and the other with stage "two".

I am not going to add a method to unstage something for a few reasons, firstly, no other stage mod does it, so it isn't like I'm doing something different compared to the others.

secondly, I'm not going to write a bad method to fix other people's bad coding, it wouldn't be performant code, just because of how things are done with storing stage -> recipe, it would just cause long script load times.

lastly, if this was being done in an actual mod, the mod would do exactly what I said, just not register it to begin with.

commented

Agreed, changing the stage of a recipe that already has a stage set is inconsistent.

Agreed, a removal function would be beneficial - consider the use case of an optional component of a mod, that restages several key items for a different difficulty. In particular, an optional expansion to a mod, maintained by different developers.
If there were a proper restaging or removal command, this use case would be supported by simply adding the optional file. The base mod could be freely patched with the optional addon's changes staying intact. Instead, the addon is forced into versioning hell to stay concurrent with the base mod.

What will be the stage after executing two sequential commands:

mods.recipestages.Recipes.setRecipeStage("one", <minecraft:stone_hoe>);
mods.recipestages.Recipes.setRecipeStage("two", <minecraft:stone_hoe>);

Will the hoe recipe be stage 1, stage 2, or is it nondeterministic?

commented

While I am no longer working on this, so I'm not particularly invested anymore, I would just like to point out: "no other stage mod does it." That's just false. As I mentioned, I was using removeItemStage from ItemStages. ItemStages is probably the single most important stage addon, and it has that functionality... so saying that no other stage mod does it is a little silly .-.

commented

No.

Just don't add the recipe in the first place, use an array to store the outputs that you dint want staged, then check if the recipe you are staging outputs an item in that array, if if it does, don't stage it.

Is there any example about how to write a script like that?