mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-18 03:15:03 +00:00
add bq ae2 nei overlay support (#79)
This commit is contained in:
1 parent
f3339702da
commit
5dcb402fca
2 files changed
+53
No files matched your search
@@ -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<String> getAllOverlayIdentifier() {
|
||||
return new HashSet<>(Arrays.asList("bq_quest"));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeProcessorId() {
|
||||
return "betterquesting";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<PositionedStack> getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) {
|
||||
List<PositionedStack> recipeInputs = new ArrayList<>();
|
||||
if (this.getAllOverlayIdentifier().contains(identifier)) {
|
||||
recipeInputs.addAll(recipe.getIngredientStacks(recipeIndex));
|
||||
return recipeInputs;
|
||||
}
|
||||
return recipeInputs;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<PositionedStack> getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) {
|
||||
List<PositionedStack> recipeOutput = new ArrayList<>();
|
||||
if (this.getAllOverlayIdentifier().contains(identifier)) {
|
||||
recipeOutput.add(recipe.getOtherStacks(recipeIndex).get(0));
|
||||
}
|
||||
return recipeOutput;
|
||||
}
|
||||
}
|
||||
@@ -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-----");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user