diff --git a/src/main/java/com/github/vfyjxf/nee/processor/BetterQuestingRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/BetterQuestingRecipeProcessor.java new file mode 100644 index 0000000..1d2cfe9 --- /dev/null +++ b/src/main/java/com/github/vfyjxf/nee/processor/BetterQuestingRecipeProcessor.java @@ -0,0 +1,48 @@ +package com.github.vfyjxf.nee.processor; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import javax.annotation.Nonnull; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.IRecipeHandler; + +public class BetterQuestingRecipeProcessor implements IRecipeProcessor { + + @Nonnull + @Override + public Set getAllOverlayIdentifier() { + return new HashSet<>(Arrays.asList("bq_quest")); + } + + @Nonnull + @Override + public String getRecipeProcessorId() { + return "betterquesting"; + } + + @Nonnull + @Override + public List getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) { + List recipeInputs = new ArrayList<>(); + if (this.getAllOverlayIdentifier().contains(identifier)) { + recipeInputs.addAll(recipe.getIngredientStacks(recipeIndex)); + return recipeInputs; + } + return recipeInputs; + } + + @Nonnull + @Override + public List getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) { + List recipeOutput = new ArrayList<>(); + if (this.getAllOverlayIdentifier().contains(identifier)) { + recipeOutput.add(recipe.getOtherStacks(recipeIndex).get(0)); + } + return recipeOutput; + } +} diff --git a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java index 8a56557..4305366 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java @@ -98,6 +98,11 @@ public class RecipeProcessor { recipeProcessors.add(new GoodGeneratorRecipeProcessor()); } + if (Loader.isModLoaded("betterquesting") && Loader.isModLoaded("bq_standard")) { + NotEnoughEnergistics.logger.info("Found BetterQuesting, install BetterQuesting support"); + recipeProcessors.add(new BetterQuestingRecipeProcessor()); + } + NotEnoughEnergistics.logger.info("-----Not Enough Energistics Init Finished-----"); } }