allow autofill aspects in pattern (#62)

This commit is contained in:
lc-1337 authored and GitHub committed 2026-03-09 23:20:45 -04:00
1 parent 40c12951ce
commit e367164245
4 files changed
+40 -18

No files matched your search

@@ -11,6 +11,8 @@ public class RecipeProcessor {
public static final String NULL_IDENTIFIER = "null";
public static List<IRecipeProcessor> recipeProcessors = new ArrayList<>();
public static boolean TCNEIPlugin_isLoaded = Loader.isModLoaded("thaumcraftneiplugin");
public static boolean ThaumicEnergistics_isLoaded = Loader.isModLoaded("thaumicenergistics");
public static void init() {
NotEnoughEnergistics.logger.info("-----Not Enough Energistics Init Start-----");
@@ -58,7 +60,7 @@ public class RecipeProcessor {
NotEnoughEnergistics.logger.info("Found Forestry, install Forestry support");
recipeProcessors.add(new ForestryRecipeProcessor());
}
if (Loader.isModLoaded("thaumcraftneiplugin")) {
if (TCNEIPlugin_isLoaded) {
NotEnoughEnergistics.logger.info("Found TCNEIPlugin, install TCNEIPlugin support");
recipeProcessors.add(new TCNEIPluginRecipeProcessor());
}
@@ -1,5 +1,7 @@
package com.github.vfyjxf.nee.processor;
import static com.github.vfyjxf.nee.processor.RecipeProcessor.ThaumicEnergistics_isLoaded;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
@@ -42,7 +44,11 @@ public class TCNEIPluginRecipeProcessor implements IRecipeProcessor {
List<PositionedStack> recipeInputs = new ArrayList<>();
if (this.getAllOverlayIdentifier().contains(identifier)) {
recipeInputs.addAll(recipe.getIngredientStacks(recipeIndex));
recipeInputs.removeIf(positionedStack -> positionedStack.item.getItem() instanceof ItemAspect);
if (!ThaumicEnergistics_isLoaded) {
recipeInputs.removeIf(positionedStack -> positionedStack.item.getItem() instanceof ItemAspect);
}
return recipeInputs;
}
return recipeInputs;
@@ -54,6 +60,11 @@ public class TCNEIPluginRecipeProcessor implements IRecipeProcessor {
List<PositionedStack> recipeOutputs = new ArrayList<>();
if (this.getAllOverlayIdentifier().contains(identifier)) {
recipeOutputs.add(recipe.getResultStack(recipeIndex));
if (!ThaumicEnergistics_isLoaded) {
recipeOutputs.removeIf(positionedStack -> positionedStack.item.getItem() instanceof ItemAspect);
}
return recipeOutputs;
}
return recipeOutputs;