GTNewHorizons / JustEnoughCalculation

A simple minecraft mod help you calculate the cost for recipes
Other
5 stars 5 forks source link

Is there a technical reason why the calculator doens't import recipes from JEI automatically? #17

Closed mainrs closed 3 days ago

mainrs commented 3 days ago

Having to add every single recipe I want to calculate it kind of cumbersome :( I was wondering what the reason behind this decision was.

PlayfulPiano commented 3 days ago

There are multiple recipes for the same item output, some with cheaper or more expensive costs to generate. It would be extremely difficult if not impossible to have the mod automatically pick the correct recipe path for an item or specifically modulate the recipes based on what stage of the game you're in.

The best that can be done with this type of mod is have a set of default recipes pre loaded (emi does this), but even then that's usually limited to vanilla recipes as mod recipes are usually modpack specific.

E.g. iron ingots to iron plates either require a hammer and 2 ingots in a crafting table (stone age), 3 ingots in a forge hammer for 2 plates (steam age), or 1 ingot in a bender for 1 plate (LV). How would the mod calculate the recipe correctly here?

The only alternative is to preload everything but include a default recipe system that requires manual enabling. That might be a little better for the user, but similarly that would be pretty complex on the development side.

mainrs commented 3 days ago

There are multiple recipes for the same item output, some with cheaper or more expensive costs to generate. It would be extremely difficult if not impossible to have the mod automatically pick the correct recipe path for an item or specifically modulate the recipes based on what stage of the game you're in.

The best that can be done with this type of mod is have a set of default recipes pre loaded (emi does this), but even then that's usually limited to vanilla recipes as mod recipes are usually modpack specific.

E.g. iron ingots to iron plates either require a hammer and 2 ingots in a crafting table (stone age), 3 ingots in a forge hammer for 2 plates (steam age), or 1 ingot in a bender for 1 plate (LV). How would the mod calculate the recipe correctly here?

The only alternative is to preload everything but include a default recipe system that requires manual enabling. That might be a little better for the user, but similarly that would be pretty complex on the development side.

Fair enough. The only idea that I had was to have some kind of screen where users can see all the recipes for a given item and select a single variant which will be used for all calculations. They can also change said variant on the same screen later on if they want to take advantage of better recipe ratios.

I can see that this is quite a lot of work to implement. Would you be willing to accept a PR if someone puts in the effort?

Alexdoru commented 3 days ago

t a single variant which will be used for all calculations. They can also change said variant on the same screen later on if they want to take advantage of better recipe ratios.

I can see that this is quite a lot of work to implement. Would you be willing to accept a PR if someone puts in the effort?

yes of course we would accept PR for such a feature, that would be a nice addition :)

PlayfulPiano commented 3 days ago

There are multiple recipes for the same item output, some with cheaper or more expensive costs to generate. It would be extremely difficult if not impossible to have the mod automatically pick the correct recipe path for an item or specifically modulate the recipes based on what stage of the game you're in.

The best that can be done with this type of mod is have a set of default recipes pre loaded (emi does this), but even then that's usually limited to vanilla recipes as mod recipes are usually modpack specific.

E.g. iron ingots to iron plates either require a hammer and 2 ingots in a crafting table (stone age), 3 ingots in a forge hammer for 2 plates (steam age), or 1 ingot in a bender for 1 plate (LV). How would the mod calculate the recipe correctly here?

The only alternative is to preload everything but include a default recipe system that requires manual enabling. That might be a little better for the user, but similarly that would be pretty complex on the development side.

Fair enough. The only idea that I had was to have some kind of screen where users can see all the recipes for a given item and select a single variant which will be used for all calculations. They can also change said variant on the same screen later on if they want to take advantage of better recipe ratios.

I can see that this is quite a lot of work to implement. Would you be willing to accept a PR if someone puts in the effort?

Yeah of course. I would make a few suggestions on how to do that implementation though, if you plan to do so:

Good luck though, if you are planning to do a PR (or to anyone else who might read this)