GregTech CE Unofficial

GregTech CE Unofficial

412k Downloads

Cannot invoke CTRecipe.inputs via CraftTweaker due to incompatible class

Delfayne opened this issue ยท 0 comments

commented

GregTech CEu Version

2.5.2-beta

Modpack Used

No response

Addons Installed

No response

Environment

Singleplayer/dev

New Worlds

No

Cross-Mod Interaction

No

Expected Behavior

I could invoke the desired CraftTweaker method

Actual Behavior

Invoking a CTRecipe method: recipe.inputs[0].matchingItems[0].displayName fails due to this error [INITIALIZATION][CLIENT][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: gregtech.zs}: Not a valid ingredient: gregtech.api.recipes.ingredients.GTRecipeItemInput@5de6dab0 java.lang.IllegalArgumentException: Not a valid ingredient: gregtech.api.recipes.ingredients.GTRecipeItemInput@5de6dab0

This would appear to be because when the CraftTweaker.getIIngredient(...) method is called in the constructor for gregtech.api.recipes.crafttweaker.InputIngredient, the passed parameter is of type GTRecipeInput. This came from a refactor around August. Past versions passed CountableIngredient.getIngredient() (source https://github.com/GregTechCE/GregTech/blob/f0ee6248a7ee29177b326830561ffd1176ca7e75/src/main/java/gregtech/api/recipes/crafttweaker/InputIngredient.java#L22 )

Steps to Reproduce

Pretty much any dereference of CTRecipe.inputs would do it.

Additional Information

No response