mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-10-25 20:32:19 +00:00
Update ThermalExpansionRecipeProcessor.java
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user