[IMC Bug] Constructor for Elecrotlytic Separator always catches an Exception in createRecipe
Digitoris opened this issue ยท 1 comments
Whilst trying to enhance my modded experience in minecraft by writing a small mod that adds all sorts of small changes, I seemed to be unable to register a new recipe for the Electrolytic Separator via the IMCHandler. After many fruitless attempts to find an error in my IMC-message, I noticed that the Constructor 'construct' in RecipeHandler.java (common/recipes) (line 613 in master) is required to have an inputClass (FluidInput.class) and an outputClass (ChemicalPairOutput.class) as the class 'SeparatorRecipe.java (common/recipes/machine)' is searched for suitable constructors with the getDeclaredConstructors(InputClass, OutputClass) method. However, all constructors in SeparatorRecipe.java require another parameter: double energyUsage. Therefore the getDeclaredConstructor(InputClass, OutputClass) will never find a suitable constructor, and createRecipe() will return null and invalidate all IMC-sent recipes for the Separator.
For now I can easily use the deprecated method addElectrolyticSeparatorRecipe() from the Mekanism API RecipeHelper to add some recipes, but once that functionality gets removed, this issue becomes a problem that requires fixing.