diff --git a/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java index 208c5d9..328e21c 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java @@ -18,6 +18,8 @@ public class GTPPRecipeProcessor implements IRecipeProcessor { public Set getAllOverlayIdentifier() { HashSet identifiers = new HashSet<>(Collections.singletonList("GTPP_Decayables")); + // GTNH version of GT++ deprecated this, but other versions still use it + // noinspection deprecation for (GTPP_Recipe.GTPP_Recipe_Map_Internal gtppMap : GTPP_Recipe.GTPP_Recipe_Map_Internal.sMappingsEx) { if (gtppMap.mNEIAllowed) { identifiers.add(gtppMap.mNEIName); diff --git a/src/main/java/com/github/vfyjxf/nee/processor/GregTech5RecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/GregTech5RecipeProcessor.java index a3a246a..ffa19db 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/GregTech5RecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/GregTech5RecipeProcessor.java @@ -84,7 +84,7 @@ public class GregTech5RecipeProcessor implements IRecipeProcessor { @Override public List getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) { List recipeInputs = new ArrayList<>(); - if (gtDefaultClz.isInstance(recipe) || gtAssLineClz.isInstance(recipe)) { + if (canProcessRecipe(recipe)) { if (GuiUtils.isFluidCraftPatternTermEx(Minecraft.getMinecraft().currentScreen)) { boolean priority = ((GuiFluidPatternTerminalEx) Minecraft .getMinecraft().currentScreen).container.prioritize; @@ -125,7 +125,7 @@ public class GregTech5RecipeProcessor implements IRecipeProcessor { @Override public List getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) { List recipeOutputs = new ArrayList<>(); - if (gtDefaultClz.isInstance(recipe) || gtAssLineClz.isInstance(recipe)) { + if (canProcessRecipe(recipe)) { recipeOutputs.addAll(recipe.getOtherStacks(recipeIndex)); recipeOutputs.removeIf(positionedStack -> getFluidFromDisplayStack(positionedStack.items[0]) != null); // remove output if it's chance != 10000 @@ -141,4 +141,9 @@ public class GregTech5RecipeProcessor implements IRecipeProcessor { public boolean mergeStacks(IRecipeHandler recipe, int recipeIndex, String identifier) { return !"gt.recipe.fakeAssemblylineProcess".equals(identifier); } + + private boolean canProcessRecipe(IRecipeHandler recipe) { + return (gtDefaultClz != null && gtDefaultClz.isInstance(recipe)) + || (gtAssLineClz != null && gtAssLineClz.isInstance(recipe)); + } }