mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-25 14:24:33 +00:00
there is more
This commit is contained in:
1 parent
c5adb9c85b
commit
7cd70520ca
4 files changed
+59
-62
No files matched your search
+17
-19
@@ -10,6 +10,17 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ThermalExpansionRecipeProcessor implements IRecipeProcessor {
|
||||
|
||||
private static Class<?> thermalNeiRecipeBaseClass;
|
||||
|
||||
static {
|
||||
try {
|
||||
thermalNeiRecipeBaseClass =
|
||||
Class.forName("cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerBase$NEIRecipeBase");
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Set<String> getAllOverlayIdentifier() {
|
||||
@@ -37,15 +48,8 @@ public class ThermalExpansionRecipeProcessor implements IRecipeProcessor {
|
||||
if (this.getAllOverlayIdentifier().contains(identifier)) {
|
||||
recipeInputs.addAll(recipe.getIngredientStacks(recipeIndex));
|
||||
if (recipe instanceof RecipeHandlerBase) {
|
||||
Class<?> NEIRecipeBase = null;
|
||||
try {
|
||||
NEIRecipeBase =
|
||||
Class.forName("cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerBase$NEIRecipeBase");
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (NEIRecipeBase != null) {
|
||||
Field secondaryInputField = ReflectionHelper.findField(NEIRecipeBase, "secondaryInput");
|
||||
if (thermalNeiRecipeBaseClass != null) {
|
||||
Field secondaryInputField = ReflectionHelper.findField(thermalNeiRecipeBaseClass, "secondaryInput");
|
||||
PositionedStack secondaryInput = null;
|
||||
try {
|
||||
secondaryInput = (PositionedStack)
|
||||
@@ -71,17 +75,11 @@ public class ThermalExpansionRecipeProcessor implements IRecipeProcessor {
|
||||
if (this.getAllOverlayIdentifier().contains(identifier)) {
|
||||
recipeOutputs.add(recipe.getResultStack(recipeIndex));
|
||||
if (recipe instanceof RecipeHandlerBase) {
|
||||
Class<?> NEIRecipeBase = null;
|
||||
try {
|
||||
NEIRecipeBase =
|
||||
Class.forName("cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerBase$NEIRecipeBase");
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (NEIRecipeBase != null) {
|
||||
Field secondaryOutputField = ReflectionHelper.findField(NEIRecipeBase, "secondaryOutput");
|
||||
if (thermalNeiRecipeBaseClass != null) {
|
||||
Field secondaryOutputField =
|
||||
ReflectionHelper.findField(thermalNeiRecipeBaseClass, "secondaryOutput");
|
||||
Field secondaryOutputChanceField =
|
||||
ReflectionHelper.findField(NEIRecipeBase, "secondaryOutputChance");
|
||||
ReflectionHelper.findField(thermalNeiRecipeBaseClass, "secondaryOutputChance");
|
||||
PositionedStack secondaryOutput = null;
|
||||
int secondaryOutputChance = 0;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user