Update ThermalExpansionRecipeProcessor.java

This commit is contained in:
vfyjxf committed 2021-08-13 03:25:57 +08:00
1 parent d328e9d6d3
commit 4c2469f864
1 file changed
+4 -1
@@ -70,13 +70,16 @@ public class ThermalExpansionRecipeProcessor implements IRecipeProcessor {
}
if (NEIRecipeBase != null) {
Field secondaryOutputField = ReflectionHelper.findField(NEIRecipeBase, "secondaryOutput");
Field secondaryOutputChanceField = ReflectionHelper.findField(NEIRecipeBase, "secondaryOutputChance");
PositionedStack secondaryOutput = null;
int secondaryOutputChance = 0;
try {
secondaryOutput = (PositionedStack) secondaryOutputField.get(((RecipeHandlerBase) recipe).arecipes.get(recipeIndex));
secondaryOutputChance = (int) secondaryOutputChanceField.get(((RecipeHandlerBase) recipe).arecipes.get(recipeIndex));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
if (secondaryOutput != null) {
if (secondaryOutput != null && secondaryOutputChance >= 100) {
recipeOutputs.add(secondaryOutput);
}
}