Low-Drag-MC / LDLib-MultiLoader

GNU General Public License v3.0
13 stars 17 forks source link

Implementation of JEI's IRecipeCategory results in error with Just Enough Calculation #23

Closed whizzball1 closed 1 month ago

whizzball1 commented 7 months ago

Just Enough Calculation, a mod like EMI but with an 'inventory' that can accept recipes from JEI, encounters serious errors attempting to transfer GregTech recipes from JEI. It cannot do so because it relies on all JEI recipes somehow going back to the Minecraft Recipe type. When GregTech registers its JEI RecipeTypeCategorys here, it uses LDLib's ModularUIRecipeCategory.

ModularUIRecipeCategory accepts a T type T extends ModularWrapper<?> which, notably, does not in any way extend Minecraft's Recipe type.

In contrast, other mods like EnderIO implement IRecipeCategory using a type that extends Recipe. An example is TankCategeory, which accepts TankRecipe which extends Recipe (through EnderRecipe).

It happens that GregTech's actual recipes (GTRecipe) do extend Recipe, but in order to use LDLib's JEI Recipe Category feature, it sticks its perfectly normal Recipes into the class GTRecipeWrapper which extends LDLib's ModularWrapper<Widget>.

TL;DR: LDLib implements JEI's IRecipeCategory in a way that does not ultimately reference Minecraft's Recipe type. This causes problems for any mods which want to work universally with all recipes, like Just Enough Calculation.

whizzball1 commented 7 months ago

(Note: I just mentioned this issue in a GregTech issue, shown above, so they know what's happening.)