mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-26 14:52:59 +00:00
Add TCNEIPlugin support and ThaumicEnergistics support
This commit is contained in:
1 parent
5b53c52f71
commit
fffc512469
27 files changed
+266
-24
No files matched your search
@@ -34,6 +34,10 @@ public class RecipeProcessor {
|
||||
NotEnoughEnergistics.logger.info("Found Forestry, install Forestry support");
|
||||
recipeProcessors.add(new ForestryRecipeProcessor());
|
||||
}
|
||||
if(Loader.isModLoaded("thaumcraftneiplugin")){
|
||||
NotEnoughEnergistics.logger.info("Found TCNEIPlugin, install TCNEIPlugin support");
|
||||
recipeProcessors.add(new TCNEIPluginRecipeProcessor());
|
||||
}
|
||||
if (Loader.isModLoaded("appliedenergistics2")) {
|
||||
NotEnoughEnergistics.logger.info("Applied Energistics 2 will not be supported");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.github.vfyjxf.nee.processor;
|
||||
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import com.djgiannuzz.thaumcraftneiplugin.items.ItemAspect;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author vfyjxf
|
||||
*/
|
||||
public class TCNEIPluginRecipeProcessor implements IRecipeProcessor{
|
||||
|
||||
@Override
|
||||
public Set<String> getAllOverlayIdentifier() {
|
||||
return new HashSet<>(Arrays.asList(
|
||||
"arcaneshapedrecipes","arcaneshapelessrecipes","aspectsRecipe",
|
||||
"cruciblerecipe","infusionCrafting"
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) {
|
||||
for(String ident : getAllOverlayIdentifier()){
|
||||
if(ident.equals(identifier)){
|
||||
List<PositionedStack> recipeInputs = new ArrayList<>(recipe.getIngredientStacks(recipeIndex));
|
||||
recipeInputs.removeIf(positionedStack -> positionedStack.item.getItem() instanceof ItemAspect);
|
||||
return recipeInputs;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) {
|
||||
for(String ident : getAllOverlayIdentifier()){
|
||||
if(ident.equals(identifier)){
|
||||
List<PositionedStack> recipeOutputs = new ArrayList<>();
|
||||
recipeOutputs.add(recipe.getResultStack(recipeIndex));
|
||||
return recipeOutputs;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user