emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
221 stars 46 forks source link

[Feature Request] Auto-Select Recipes or Items with a Single Option #451

Closed EpicPuppy613 closed 4 months ago

EpicPuppy613 commented 4 months ago

In the recipe tree, if there is only 1 recipe for the item or the is only 1 item for the tag, it should be automatically selected. This would reduce the amount of effort it takes to fill the recipe tree.

emilyploszaj commented 4 months ago

This may seem like an intuitive feature but it results in far too many situations where a recipe is selected where it's not desired. In practice, you can hold shift and click on a node to auto-select a recipe in the tree, and if there's only one recipe, this should always be the one you want. (In regards to tags, they are only used if multiple options exist, so in a sense that situation is not possible) For a simple example, imagine an ingot you can only find in chests, that has an accompanying building block. Now, for any recipes that require the ingot will always break the ingot down to blocks, because the only recipe for that ingot is 1 block -> 9 ingots. That's not desired. Alternatively, imagine a modpack with mods like quark and ic2. You need to craft some hopper minecarts, so you open a recipe tree and intend to see 10 ingots of iron and 8 planks of wood. Instead, the tree stops at the hopper step, because the hopper recipe uses the chests tag, so you select birch chests, as you have mostly birch wood. Now, the recipe tree breaks down birch chests as costing 8 birch planks, which breaks down to costing 2 birch logs... which now breaks down to costing 12mB of UU matter. This is because birch logs don't typically have any recipes, but a mod like ic2 could add ones. There are too many cases where picking the "only" recipe that exists for an item is incorrect behavior resulting in confusing recipe trees. EMI's functionality allows mod devs to include resource pack files specifying which recipes should be the "default" way to craft all of its results, and EMI provides one for vanilla. Past this, users can set their own recipe defaults while ingame, and the recipe tree can quickly set recipes, like using shift clicking to try and pick a recipe. I hope this explains why EMI functions like it does and will not be automatically breaking down every possible recipe.