mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-20 20:12:11 +00:00
shit fired
This commit is contained in:
1 parent
18647ceb31
commit
bb4a1e9e58
2 files changed
+15
-9
No files matched your search
@@ -2,6 +2,7 @@ package com.glodblock.github.nei.recipes;
|
||||
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import com.glodblock.github.nei.object.IRecipeExtractor;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
|
||||
@@ -19,19 +20,21 @@ public final class FluidRecipe {
|
||||
}
|
||||
|
||||
public static List<OrderStack<?>> getPackageInputs(IRecipeHandler recipe, int index) {
|
||||
if (recipe == null || !IdentifierMap.containsKey(recipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(recipe.getOverlayIdentifier());
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipe;
|
||||
if (tRecipe == null || !IdentifierMap.containsKey(tRecipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(tRecipe.getOverlayIdentifier());
|
||||
if (extractor == null) return new ArrayList<>();
|
||||
List<PositionedStack> tmp = new ArrayList<>(recipe.getIngredientStacks(index));
|
||||
List<PositionedStack> tmp = new ArrayList<>(tRecipe.getIngredientStacks(index));
|
||||
return extractor.getInputIngredients(tmp);
|
||||
}
|
||||
|
||||
public static List<OrderStack<?>> getPackageOutputs(IRecipeHandler recipe, int index, boolean useOther) {
|
||||
if (recipe == null || !IdentifierMap.containsKey(recipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(recipe.getOverlayIdentifier());
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipe;
|
||||
if (tRecipe == null || !IdentifierMap.containsKey(tRecipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(tRecipe.getOverlayIdentifier());
|
||||
if (extractor == null) return new ArrayList<>();
|
||||
List<PositionedStack> tmp = new ArrayList<>(Collections.singleton(recipe.getResultStack(index)));
|
||||
if (useOther) tmp.addAll(recipe.getOtherStacks(index));
|
||||
List<PositionedStack> tmp = new ArrayList<>(Collections.singleton(tRecipe.getResultStack(index)));
|
||||
if (useOther) tmp.addAll(tRecipe.getOtherStacks(index));
|
||||
return extractor.getOutputIngredients(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user