GregTechCE / GregTech

GregTech rewrite for modern versions of Minecraft
GNU Lesser General Public License v3.0
271 stars 150 forks source link

[Suggestion] Block for more precise multiblock recipe control #1210

Open LAGIdiot opened 4 years ago

LAGIdiot commented 4 years ago

Idea: Block which can be used as part of multiblock structure which supports more precise control over recipes.

Concept: This block will have 4 functions all of them concerning around recipes.

  1. Possibility to show all recipes which can multiblock process Either without checking inputs. Which for Blast Furnace would mean all recipes capped by Heat (and EU/t?) Or with checking them. Which would produce just doable recipes.

  2. Control over prioritization recipes based on Fluid use. Requested by @Saereth This could allow to prioritize recipes with Fluid as input if Item inputs are same. Example: Recipes for Freezer may have Energy and time discount when freezing liquid is used as part of recipe. Which is currently not possible. This could go as far as ignoring recipes without liquid if variant with liquid exists.

  3. Control over prioritization of recipes. Mods: default/round robin/first input/fastest/random

  4. And last but not least build in Integrated circuit which could be set from GUI or even via Redstone (there will be switch on GUI which half of range is being set as circuit can have 0-31 value).

All functions will have activation switch so only some may be used.

eutro commented 4 years ago
  1. I feel like this would be best done from the controller GUI, and, for simplicity, showing all possible recipes in JEI. I don't think it would make much sense to check them at all:
    • If a recipe is completely possible it should be obvious, since the machine would most likely be doing the recipe.
    • If another machine shows all recipes, it would be illogical to filter the recipes in another machine. For example, a vacuum freezer with no conditions other than items/fluids wouldn't filter out any recipes, in contrast to the blast furnace that would.
  2. Allowing for prioritizing recipes seems like it should be part of an overhauled recipe system, rather than the functionality of a block. However, configuring to have the machine ignore certain recipes could be interesting.
  3. This could definitely be very interesting.
  4. Changing circuit configuration from another GUI would be very interesting. Automatic circuit changing would be even more interesting, though there should be some way to tell the current circuit configuration, perhaps with comparators.

I think 1. could be part of all machine GUIs, not just multiblock machines; 2. could be part of a general overhaul of recipes; 3 could be a machine cover, and 4 could be a machine cover of its own.

galyfray commented 3 years ago

Just got an idea about this and #1215 let me explain how I would implement it and tell me if you have things better or if I propose some heretic code :)
Machines will get a new field RecipeMatcher from an interface wich would take the machine itself as argument (for genralism sake) so covers could change how the matching of recipe behave. RecipeMaps (or any better place not sure) will have a list of Matcher this interface would contain a method returning a boolean, and I'm not sure about params. the objective of the Matcher will be to tell if the recipe matches a specific condition allowing to omit default recipes element (fluid and items) and also adding different element like mekanism gases, coil heat, weather (why not ?) or anything that could be checked with a Matcher. (okay so I just re-read the other issue and find out that I allready get this idea .. )